diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2008-06-22 16:34:14 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2008-06-22 16:34:14 +0000 |
commit | 09f70ec67186bb10dbd252650210bff2daa70ec7 (patch) | |
tree | f27e1a57d5fe813f3a7c6d33c7c56fb98880d1c1 /generator | |
parent | a2da607bd4eed604a9e7d59528886b24de27222f (diff) | |
download | netpbm-mirror-09f70ec67186bb10dbd252650210bff2daa70ec7.tar.gz netpbm-mirror-09f70ec67186bb10dbd252650210bff2daa70ec7.tar.xz netpbm-mirror-09f70ec67186bb10dbd252650210bff2daa70ec7.zip |
Release 10.35.46
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@654 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'generator')
-rw-r--r-- | generator/pbmtext.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generator/pbmtext.c b/generator/pbmtext.c index a5390d4b..d0a6291b 100644 --- a/generator/pbmtext.c +++ b/generator/pbmtext.c @@ -575,7 +575,7 @@ getText(const char cmdline_text[], struct text input_text; if (cmdline_text) { - allocTextArray(&input_text, 1, strlen(cmdline_text)); + allocTextArray(&input_text, 1, strlen(cmdline_text)*8); strcpy(input_text.textArray[0], cmdline_text); fix_control_chars(input_text.textArray[0], fn); input_text.lineCount = 1; @@ -595,9 +595,9 @@ getText(const char cmdline_text[], lineCount = 0; /* initial value */ while (fgets(buf, sizeof(buf), stdin) != NULL) { - if (strlen(buf) + 1 >= sizeof(buf)) + if (strlen(buf)*8 + 1 >= sizeof(buf)) pm_error("A line of input text is longer than %u characters." - "Cannot process.", sizeof(buf)-1); + "Cannot process.", (sizeof(buf)-1)/8); fix_control_chars(buf, fn); if (lineCount >= maxlines) { maxlines *= 2; |