netpbm/netpbm-10.35-ppmdfontfix.patch
Jindrich Novy d300d89c7d - remove two hunks from security patch breaking pbmclean and pbmlife
(#493015)
- fix ppmdfont and svgtopnm, thanks to Jiri Moskovcak
2009-03-31 14:01:09 +00:00

14 lines
729 B
Diff

diff -up netpbm-10.35.58/lib/ppmdfont.c.ppmdfontfix netpbm-10.35.58/lib/ppmdfont.c
--- netpbm-10.35.58/lib/ppmdfont.c.ppmdfontfix 2009-01-19 09:23:54.000000000 +0100
+++ netpbm-10.35.58/lib/ppmdfont.c 2009-03-23 13:06:36.000000000 +0100
@@ -62,7 +62,8 @@ static void
readFontHeader(FILE * const ifP,
struct ppmd_fontHeader * const fontHeaderP) {
- fread(&fontHeaderP->signature, 1, sizeof(fontHeaderP->signature), ifP);
+ if (!fread(&fontHeaderP->signature, 1, sizeof(fontHeaderP->signature), ifP))
+ pm_error("Error reading font header.");
fontHeaderP->format = fgetc(ifP);
fontHeaderP->characterCount = fgetc(ifP);
fontHeaderP->firstCodePoint = fgetc(ifP);