diff options
author | athrxx | 2012-12-28 01:31:13 +0100 |
---|---|---|
committer | athrxx | 2013-01-09 20:22:26 +0100 |
commit | a7c77e8104019f8958b399ef00980ebf32ae71b6 (patch) | |
tree | d744c47ec1497e17df654a8b5657582a38558c08 /devtools/create_kyradat | |
parent | 4eba2a7e54840f74dc741d960432dc3f7e0cc8a0 (diff) | |
download | scummvm-rg350-a7c77e8104019f8958b399ef00980ebf32ae71b6.tar.gz scummvm-rg350-a7c77e8104019f8958b399ef00980ebf32ae71b6.tar.bz2 scummvm-rg350-a7c77e8104019f8958b399ef00980ebf32ae71b6.zip |
KYRA: fix invalid mem access in kyradat tool
Diffstat (limited to 'devtools/create_kyradat')
-rw-r--r-- | devtools/create_kyradat/extract.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/devtools/create_kyradat/extract.cpp b/devtools/create_kyradat/extract.cpp index 86244fce42..7388a32769 100644 --- a/devtools/create_kyradat/extract.cpp +++ b/devtools/create_kyradat/extract.cpp @@ -965,12 +965,13 @@ bool extractPaddedStrings(PAKFile &out, const ExtractInformation *info, const by src++; while (*src && src < fin) *dst++ = *src++; - - *dst++ = '\0'; + if (src < fin) + *dst++ = *src++; entries++; } WRITE_BE_UINT32(buffer, entries); + outsize = dst - buffer; return out.addFile(filename, buffer, outsize); |