Browse code

bb#1239

git-svn: trunk@4311

aCaB authored on 2008/10/30 21:26:30
Showing 2 changed files
... ...
@@ -1,3 +1,8 @@
1
+Thu Oct 30 13:52:42 CET 2008 (acab)
2
+-----------------------------------
3
+ * libclamav/vba_extract.c: get_unicode_name off-by-one - bb#1239
4
+ 			    reported by Moritz Jodeit <moritz*jodeit.org>
5
+
1 6
 Thu Oct 30 13:07:53 EET 2008 (edwin)
2 7
 ------------------------------------
3 8
  * unit_tests/valgrind.supp: suppress more valgrind race warnings
... ...
@@ -107,7 +107,7 @@ get_unicode_name(const char *name, int size, int big_endian)
107 107
 	if((name == NULL) || (*name == '\0') || (size <= 0))
108 108
 		return NULL;
109 109
 
110
-	newname = (char *)cli_malloc(size * 7);
110
+	newname = (char *)cli_malloc(size * 7 + 1);
111 111
 	if(newname == NULL)
112 112
 		return NULL;
113 113