diff options
Diffstat (limited to 'graphics/jbigkit/files/patch-warnings')
-rw-r--r-- | graphics/jbigkit/files/patch-warnings | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/graphics/jbigkit/files/patch-warnings b/graphics/jbigkit/files/patch-warnings new file mode 100644 index 0000000..760c0d7 --- /dev/null +++ b/graphics/jbigkit/files/patch-warnings @@ -0,0 +1,36 @@ +--- pbmtools/pbmtojbg85.c 2014-03-27 14:47:15.000000000 -0400 ++++ pbmtools/pbmtojbg85.c 2014-04-08 09:00:16.000000000 -0400 +@@ -71,8 +71,12 @@ + if (c != EOF) { + ungetc(c, f); +- fscanf(f, "%lu", &i); +- } ++ if (fscanf(f, "%lu", &i) == 1) ++ return i; ++ else ++ fprintf(stderr, "%s: corrupt input", progname); ++ } else ++ fprintf(stderr, "%s: unexpected end of input", progname); + +- return i; ++ return -1; + } + +--- pbmtools/pbmtojbg.c 2014-03-27 14:47:15.000000000 -0400 ++++ pbmtools/pbmtojbg.c 2014-04-08 09:00:16.000000000 -0400 +@@ -87,8 +87,12 @@ + if (c != EOF) { + ungetc(c, f); +- fscanf(f, "%lu", &i); +- } ++ if (fscanf(f, "%lu", &i) == 1) ++ return i; ++ else ++ fprintf(stderr, "%s: corrupt input", progname); ++ } else ++ fprintf(stderr, "%s: unexpected end of input", progname); + +- return i; ++ return -1; + } + |