diff options
-rw-r--r-- | Makefile.version | 2 | ||||
-rw-r--r-- | doc/HISTORY | 4 | ||||
-rw-r--r-- | generator/pbmtext.c | 5 |
3 files changed, 10 insertions, 1 deletions
diff --git a/Makefile.version b/Makefile.version index 4ea55b22..ec978db6 100644 --- a/Makefile.version +++ b/Makefile.version @@ -1,3 +1,3 @@ NETPBM_MAJOR_RELEASE = 10 NETPBM_MINOR_RELEASE = 35 -NETPBM_POINT_RELEASE = 42 +NETPBM_POINT_RELEASE = 43 diff --git a/doc/HISTORY b/doc/HISTORY index 985dc398..6c3543e5 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,6 +4,10 @@ Netpbm. CHANGE HISTORY -------------- +08.05.10 BJH Release 10.35.43 + + pbmtext: fail properly if input contains no text. + 08.04.11 BJH Release 10.35.42 pnmnorm: fix resolution of conflicting -wpercent and -wvalue. diff --git a/generator/pbmtext.c b/generator/pbmtext.c index 0614657b..a5390d4b 100644 --- a/generator/pbmtext.c +++ b/generator/pbmtext.c @@ -710,6 +710,11 @@ main(int argc, char *argv[]) { &maxwidth, &maxleftb); cols = 2 * hmargin + maxwidth; + + 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 */ |