From 41f8db5f1aa22411abdcd27cf32d12f74b947570 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> Date: Fri, 12 Nov 2010 12:58:34 +0000 Subject: Fixed memory leaks git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@559 4f64403b-2f21-0410-a795-97e2b3489a10 --- updater/xmldata.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'updater/xmldata.cpp') diff --git a/updater/xmldata.cpp b/updater/xmldata.cpp index e8b1f3a..61239b1 100644 --- a/updater/xmldata.cpp +++ b/updater/xmldata.cpp @@ -400,7 +400,7 @@ const char *FindVersion(int file_id, BYTE *pbVersionBytes, int cpbVersionBytes, char version_string[128]; strncpy(version_string, (char *)pbVersionBytes, cpbVersionBytes); - version_string[cpbVersionBytes] = 0; + version_string[sizeof(version_string)-1] = 0; ezxml_t root = ezxml_get(doc[cat], "channel", 0, "item", -1); while (root) { -- cgit v1.2.3