diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2012-07-07 22:13:07 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2012-07-07 22:13:07 +0000 |
commit | adfd75bbd1a72d28ecb4027fbe003568785da4d3 (patch) | |
tree | 2d4326cf3d81fad2d5bc3f3597fd5c93665b8c3d /converter/other/srf.c | |
parent | 0b95175582280416e8941d9c675af94c1abff375 (diff) | |
download | netpbm-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
Diffstat (limited to 'converter/other/srf.c')
-rw-r--r-- | converter/other/srf.c | 3 |
1 files changed, 1 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); } |