summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@samsung.com>2013-11-12 19:01:10 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-11-12 19:01:10 +0900
commit1281a8369f5200c2723fb027edc1625a4a939874 (patch)
tree72106c8548d0c953601c1dc2e688d4ccb8a8e0f6 /src
parent2a29732e0734af82294d7b1fccc52595f3020f15 (diff)
eina: fix uninitialized data use.
Diffstat (limited to 'src')
-rw-r--r--src/lib/eina/eina_stringshare.c2
-rw-r--r--src/tests/eina/eina_test_stringshare.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/eina/eina_stringshare.c b/src/lib/eina/eina_stringshare.c
index a630368745..36af6d460a 100644
--- a/src/lib/eina/eina_stringshare.c
+++ b/src/lib/eina/eina_stringshare.c
@@ -680,7 +680,7 @@ eina_stringshare_nprintf(unsigned int len, const char *fmt, ...)
680 if (size < 1) 680 if (size < 1)
681 return NULL; 681 return NULL;
682 682
683 return eina_stringshare_add_length(tmp, len); 683 return eina_stringshare_add_length(tmp, size);
684} 684}
685 685
686EAPI Eina_Stringshare * 686EAPI Eina_Stringshare *
diff --git a/src/tests/eina/eina_test_stringshare.c b/src/tests/eina/eina_test_stringshare.c
index 9842b1191d..13c72479ae 100644
--- a/src/tests/eina/eina_test_stringshare.c
+++ b/src/tests/eina/eina_test_stringshare.c
@@ -224,7 +224,7 @@ START_TEST(eina_stringshare_print)
224 fail_if(strcmp(t3, "x"TEST1"y") != 0); 224 fail_if(strcmp(t3, "x"TEST1"y") != 0);
225 fail_if(((int)strlen(TEST1) + 2) != eina_stringshare_strlen(t1)); 225 fail_if(((int)strlen(TEST1) + 2) != eina_stringshare_strlen(t1));
226 fail_if(((int)strlen(TEST1) + 2) != eina_stringshare_strlen(t2)); 226 fail_if(((int)strlen(TEST1) + 2) != eina_stringshare_strlen(t2));
227 fail_if(10 != eina_stringshare_strlen(t3)); 227 fail_if(8 != eina_stringshare_strlen(t3));
228 eina_stringshare_del(t1); 228 eina_stringshare_del(t1);
229 eina_stringshare_del(t2); 229 eina_stringshare_del(t2);
230 eina_stringshare_del(t3); 230 eina_stringshare_del(t3);