On Tue, Jan 26, 2010 at 1:54 PM, Enlightenment SVN
<no-re...@enlightenment.org> wrote:
> +   length = strlen(path) + 1 + strlen(name) + 1 +
> +     strlen((char *)(cb_data->data)) + 1 + sizeof("module") +
> +     sizeof(SHARED_LIB_SUFFIX) + 1;
> +
> +   file = alloca(length);
> +   snprintf(file, length, "%s/%s/%s/module" SHARED_LIB_SUFFIX,
> +            path, name, (char *)(cb_data->data));

not something will make it crash, but sizeof() already accounts \0, so
in this code we have 2 extra \0 bytes, one for sizeof("module") and
another for sizeof(SHARED_LIB_SUFFIX).

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: barbi...@gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to