fixed segfault in pdf2pdf
authorMatthias Kramm <kramm@quiss.org>
Tue, 2 Mar 2010 19:57:29 +0000 (11:57 -0800)
committerMatthias Kramm <kramm@quiss.org>
Tue, 2 Mar 2010 19:57:29 +0000 (11:57 -0800)
lib/devices/pdf.c
lib/pdf/Makefile.in

index 3183ce8..b96cda3 100644 (file)
@@ -389,6 +389,7 @@ void pdf_addfont(gfxdevice_t*dev, gfxfont_t*font)
            for(t=0;t<num;t++) {
                font->glyphs[t].unicode = 32+t;
            }
+           font->max_unicode = 0;
            font->unicode2glyph = 0;
            gfxfont_save(font, filename);
            font->id=old_id;
index 1c093c7..b700625 100644 (file)
@@ -184,6 +184,8 @@ gfx_objects2 = $(gfx_objects) ../devices/lrf.$(O) ../libocr$(A)
 
 pdf2swf$(E): $(XPDFOK) ../../src/pdf2swf.c $(libgfxpdf_objects) $(xpdf_in_source) $(splash_in_source) $(gfx_objects)
        $(LL) $(CPPFLAGS) -g ../../src/pdf2swf.c $(libgfxpdf_objects) $(xpdf_in_source) $(splash_in_source) $(gfx_objects) -o pdf2swf$(E) $(LIBS)
+pdf2pdf$(E): $(XPDFOK) ../../src/pdf2pdf.c $(libgfxpdf_objects) $(xpdf_in_source) $(splash_in_source) $(gfx_objects)
+       $(LL) $(CPPFLAGS) -g ../../src/pdf2pdf.c $(libgfxpdf_objects) $(xpdf_in_source) $(splash_in_source) $(gfx_objects) -o pdf2pdf$(E) $(LIBS)
 gfx2gfx$(E): $(XPDFOK) ../../src/gfx2gfx.c $(libgfxpdf_objects) $(xpdf_in_source) $(splash_in_source) $(gfx_objects2)
        $(LL) $(CPPFLAGS) -g ../../src/gfx2gfx.c $(libgfxpdf_objects) $(xpdf_in_source) $(splash_in_source) $(gfx_objects2) -o gfx2gfx$(E) $(LIBS)