diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2008-05-10 19:10:40 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2008-05-10 19:10:40 +0000 |
commit | a69b513e89e30be74e672a6e1cfa06b05dbb32c4 (patch) | |
tree | d93f2291cccb6029bb55d5012b24cf0f10ebb442 | |
parent | a249cfad3c50276eb331f7771fa06810f3d41d1d (diff) | |
download | netpbm-mirror-a69b513e89e30be74e672a6e1cfa06b05dbb32c4.tar.gz netpbm-mirror-a69b513e89e30be74e672a6e1cfa06b05dbb32c4.tar.xz netpbm-mirror-a69b513e89e30be74e672a6e1cfa06b05dbb32c4.zip |
Release 10.42.03
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@622 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r-- | Makefile.version | 2 | ||||
-rw-r--r-- | doc/HISTORY | 6 | ||||
-rw-r--r-- | generator/pbmtext.c | 6 | ||||
-rw-r--r-- | lib/libpbmfont.c | 2 |
4 files changed, 13 insertions, 3 deletions
diff --git a/Makefile.version b/Makefile.version index a95e296a..a7718939 100644 --- a/Makefile.version +++ b/Makefile.version @@ -1,4 +1,4 @@ NETPBM_MAJOR_RELEASE = 10 NETPBM_MINOR_RELEASE = 42 -NETPBM_POINT_RELEASE = 2 +NETPBM_POINT_RELEASE = 3 diff --git a/doc/HISTORY b/doc/HISTORY index 16549ba8..6ad28f08 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,6 +4,12 @@ Netpbm. CHANGE HISTORY -------------- +08.05.10 BJH Release 10.42.03 + + pbmtext: fail properly if input contains no text. + + pbm_loadbdffont(): handle zero size glyph. Affects pbmtext. + 08.04.09 BJH Release 10.42.02 pnmnorm: fix resolution of conflicting -wpercent and -wvalue. diff --git a/generator/pbmtext.c b/generator/pbmtext.c index 251f051a..40423db9 100644 --- a/generator/pbmtext.c +++ b/generator/pbmtext.c @@ -823,7 +823,11 @@ main(int argc, char *argv[]) { computeImageWidth(formattedText, fontP, cmdline.space, hmargin, &cols, &maxleftb); - + + if (cols == 0 || rows == 0) + pm_error("Input is all whitespace and/or non-renderable characters. " + "No output."); + bits = pbm_allocarray(cols, rows); /* Fill background with white */ diff --git a/lib/libpbmfont.c b/lib/libpbmfont.c index 708205a2..902eaf0d 100644 --- a/lib/libpbmfont.c +++ b/lib/libpbmfont.c @@ -1187,7 +1187,7 @@ createBmap(unsigned int const glyphWidth, unsigned char * bmap; int rc; - if (UINT_MAX / glyphWidth < glyphHeight) + if (glyphWidth > 0 && UINT_MAX / glyphWidth < glyphHeight) pm_error("Ridiculously large glyph"); MALLOCARRAY(bmap, glyphWidth * glyphHeight); |