[vlc-devel] commit: fix buffer overflows. ( Rémi Duraffort )

Rémi Denis-Courmont rem at videolan.org
Thu Jan 29 17:04:33 CET 2009


Le jeudi 29 janvier 2009 17:57:13 git version control, vous avez écrit :
> -    char psz_format[sizeof(COLOR_FORMAT_STRING)];
> -    char psz_format_bool[sizeof(COLOR_FORMAT_STRING_BOOL)];
> +    char psz_format[sizeof(COLOR_FORMAT_STRING) + 1];
> +    char psz_format_bool[sizeof(COLOR_FORMAT_STRING_BOOL) + 1];

You do know that sizeof("") == 1, right?
                 ^^^^^^
     This is not strlen("").

-- 
Rémi Denis-Courmont
http://git.remlab.net/cgi-bin/gitweb.cgi?p=vlc-courmisch.git;a=summary



More information about the vlc-devel mailing list