oops! strncpy is tricky and uri was a pointer not an array.

people were not noticing it as they were using 64 bits machines... but
with 32 bits just 4 bytes were copied and 3 were missing :-P



SVN revision: 42549
This commit is contained in:
Gustavo Sverzut Barbieri 2009-09-17 18:37:22 +00:00
parent 183237e348
commit 131be821c8
1 changed files with 2 additions and 2 deletions

View File

@ -778,8 +778,8 @@ _ethumb_generate_hash(const char *file)
EINA_SAFETY_ON_NULL_RETURN_VAL(file, NULL);
uri = alloca(3 * strlen(file) + 9);
strncpy(uri, "file://", sizeof(uri));
t = uri + 7;
memcpy(uri, "file://", sizeof("file://") - 1);
t = uri + sizeof("file://") - 1;
for (c = (const unsigned char *)file; *c != '\0'; c++)
{