ryuan pushed a commit to branch master.
commit e39093cd609ea156bc6cbc997d98138f183802c3
Author: Ryuan Choi <[email protected]>
Date: Sat Jul 6 20:55:41 2013 +0900
elementary_test : Fixed my fault.
Valgrind complains invalid read of size 1
---
src/bin/test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/bin/test.c b/src/bin/test.c
index 21a15fa..0e2c712 100644
--- a/src/bin/test.c
+++ b/src/bin/test.c
@@ -352,7 +352,7 @@ _space_removed_string_get(const char *name)
char *ret;
len = strlen(name);
- ret = calloc(sizeof(char), len);
+ ret = calloc(sizeof(char), len + 1);
while (name[i])
{
--
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev