From a7c77e8104019f8958b399ef00980ebf32ae71b6 Mon Sep 17 00:00:00 2001 From: athrxx Date: Fri, 28 Dec 2012 01:31:13 +0100 Subject: KYRA: fix invalid mem access in kyradat tool --- devtools/create_kyradat/extract.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'devtools') 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); -- cgit v1.2.3