about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2012-07-07 22:13:07 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2012-07-07 22:13:07 +0000
commitadfd75bbd1a72d28ecb4027fbe003568785da4d3 (patch)
tree2d4326cf3d81fad2d5bc3f3597fd5c93665b8c3d
parent0b95175582280416e8941d9c675af94c1abff375 (diff)
downloadnetpbm-mirror-adfd75bbd1a72d28ecb4027fbe003568785da4d3.tar.gz
netpbm-mirror-adfd75bbd1a72d28ecb4027fbe003568785da4d3.tar.xz
netpbm-mirror-adfd75bbd1a72d28ecb4027fbe003568785da4d3.zip
Fix storage corruption
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1710 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--converter/other/srf.c3
-rw-r--r--doc/HISTORY5
2 files changed, 6 insertions, 2 deletions
diff --git a/converter/other/srf.c b/converter/other/srf.c
index ded049ac..b0f97242 100644
--- a/converter/other/srf.c
+++ b/converter/other/srf.c
@@ -597,13 +597,12 @@ initPstring(struct srf_pstring * const pstringP,
 
     pstringP->len = strlen(s);
 
-    MALLOCARRAY(pstringP->val, pstringP->len);
+    MALLOCARRAY(pstringP->val, pstringP->len + 1);
 
     if (!pstringP->val)
         pm_error("Could not allocate memory for string of length %u",
                  pstringP->len);
 
-
     memcpy(pstringP->val, s, pstringP->len + 1);
 }
 
diff --git a/doc/HISTORY b/doc/HISTORY
index 717aea1f..62eef7d3 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -4,6 +4,11 @@ Netpbm.
 CHANGE HISTORY 
 --------------
 
+not yet  BJH  Release 10.60.00
+
+              pamtosrf: fix storage corruption.  Always broken (program added
+              in 10.55 (June 2011).
+
 12.06.28 BJH  Release 10.59.00
 
               pamtogif: Make data blocks 255 bytes instead of 254.  255 is