[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#229184: tetex-bin: ovp2ovf does not work at all



Package: tetex-bin
Version: 2.0.2-6
Severity: important
Tags: patch

There are some bugs in ovp2ovf like programs (those written in C, not in Web)
in tetex-2.0.2 that prevent them for working at all. For instance, a file
beginning by "(OFMLEVEL D 0)" will make ovp2ovf produce the following error :
"OFMLEVEL value must be D 0 or D 1". Here's an obvious patch for this
particular problem :
--- header_routines.c   2001-11-10 14:42:15.000000000 +0100
+++ /opt/src/tex/tetex-bin-2.0.2/texk/web2c/omegafonts/header_routines.c        2004-01-23 12:41:52.000000000 +0100
@@ -474,10 +474,10 @@
 {
     if (ofm_level_specified==TRUE)
         warning_0("OFMLEVEL previously defined; old value ignored");
-    if ((ofm_level != OFM_LEVEL0) && (ofm_level != OFM_LEVEL1)) {
+    if ((level != 0) && (level != 1)) {
         warning_0("OFMLEVEL value must be D 0 or D 1");
     } else {
-        ofm_level = level+1;
+        ofm_level = level ? OFM_LEVEL1 : OFM_LEVEL0;
     }
     ofm_level_specified = TRUE;
 }

Then, one may note that the program segfaults if VTITLE is not defined :

/tex/tetex-src-2.0.2/texk/web2c/omegafonts/font_routines.c font_routines.c
--- /tmp/tex/tetex-src-2.0.2/texk/web2c/omegafonts/font_routines.c      2001-11-10 14:42:15.000000000 +0100
+++ font_routines.c     2004-01-23 16:01:16.000000000 +0100
@@ -611,7 +611,7 @@
     unsigned i, k;
 
     out_ovf(DVI_PRE); out_ovf(VF_ID);
-    k = strlen(vtitle); out_ovf(k);
+    k = vtitle ? strlen(vtitle) : 0; out_ovf(k);
     for (i=0; i<k; i++) out_ovf(vtitle[i]);
     out_ovf_4(check_sum); out_ovf_4(design_size);
     output_ovf_fonts();

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux greement 2.6.0 #0 Fri Dec 19 16:14:38 CET 2003 i686





Reply to: