summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2012-10-19 01:29:19 +0000
committerCedric BAIL <cedric.bail@free.fr>2012-10-19 01:29:19 +0000
commitf345c066874699ab043edf9fa0fb75e37dd66603 (patch)
tree6765cbf739d80bdb23e49613c34d20693596413f
parentec0e619ce06f870e91cefeb1cfb5f1bfff857df9 (diff)
eina: backport r78209.
SVN revision: 78210
-rw-r--r--AUTHORS1
-rw-r--r--ChangeLog4
-rw-r--r--src/lib/eina_stringshare.c2
3 files changed, 6 insertions, 1 deletions
diff --git a/AUTHORS b/AUTHORS
index 03e9fb6..78f8ac6 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -17,3 +17,4 @@ Brett Nash <nash@nash.id.au>
17Tom Hacohen <tom@stosb.com> 17Tom Hacohen <tom@stosb.com>
18Sebastian Dransfeld <sd@tango.flipp.net> 18Sebastian Dransfeld <sd@tango.flipp.net>
19Raphael Kubo da Costa <rakuco@freebsd.org> 19Raphael Kubo da Costa <rakuco@freebsd.org>
20Patryk Kaczmarek <patryk.k@samsung.com>
diff --git a/ChangeLog b/ChangeLog
index 24ac4aa..88195e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -55,3 +55,7 @@
552012-06-06 Mike Blumenkrantz 552012-06-06 Mike Blumenkrantz
56 56
57 * 1.0.2 release 57 * 1.0.2 release
58
592012-10-19 Patryk Kaczmarek
60
61 * eina_stringshare_add_length return NULL when func args are wrong.
diff --git a/src/lib/eina_stringshare.c b/src/lib/eina_stringshare.c
index 235ca60..5c4b6f8 100644
--- a/src/lib/eina_stringshare.c
+++ b/src/lib/eina_stringshare.c
@@ -658,7 +658,7 @@ eina_stringshare_add_length(const char *str, unsigned int slen)
658 DBG("str=%p (%.*s), slen=%u", str, slen, str ? str : "", slen); 658 DBG("str=%p (%.*s), slen=%u", str, slen, str ? str : "", slen);
659 659
660 if ((!str) || (slen <= 0)) 660 if ((!str) || (slen <= 0))
661 return ""; 661 return NULL;
662 else if (slen == 1) 662 else if (slen == 1)
663 return (const char *)_eina_stringshare_single + ((*str) << 1); 663 return (const char *)_eina_stringshare_single + ((*str) << 1);
664 else if (slen < 4) 664 else if (slen < 4)