eina: eina_strlcat now work with NULL src.

This commit is contained in:
Cedric BAIL 2013-02-28 07:49:16 +09:00
parent 23cbcb5fa4
commit fde00d91a8
3 changed files with 17 additions and 8 deletions

View File

@ -1,3 +1,8 @@
2013-02-28 Cedric Bail
* eina_strlcat work with a NULL src.
2013-02-26 Carsten Haitzler (The Rasterman)
* Fix evas GL common engine to have a shader to do oversampling on

1
NEWS
View File

@ -114,6 +114,7 @@ Improvements:
* edje: reduce memory consumption of Edje program handler.
* eina, evas: improved support for 64bits system.
* Evas GL engine downscale quality in smooth mode much improved with multisampling up to effectively 16x16 via shaders.
* eina: eina_strlcat now work with a NULL source.
Fixes:
* Fix a memory leak in ecore_con_dns when using ecore_con_server_connect

View File

@ -347,16 +347,19 @@ eina_strlcat(char *dst, const char *src, size_t siz)
n = siz - dlen;
if (n == 0)
return(dlen + strlen(s));
return(dlen + (s ? strlen(s) : 0));
while (*s != '\0') {
if (n != 1)
{
*d++ = *s;
n--;
}
if (s != NULL)
{
while (*s != '\0') {
if (n != 1)
{
*d++ = *s;
n--;
}
s++;
s++;
}
}
*d = '\0';