[vlc-devel] [PATCH] Fix stack overflow in ExecuteCommand

Cheng Sun cheng.sun at ymail.com
Thu Dec 15 18:57:16 CET 2011

On 15/12/11 17:38, Rémi Denis-Courmont wrote:
> Le jeudi 15 décembre 2011 19:14:42 Cheng Sun, vous avez écrit :
>> Fix ticket #5675
>> Because ExecuteCommand allocates temporary string space on the stack,
>> proportional to the length of the command to execute, a stack overflow can
>> occur when the the command is too long.
> With this patch, VLC will do undefined behaviour as in dereferencing NULL 
> instead of undefined behaviour as in overflowing the stack.
> It could be better...
Revised patch which checks for malloc returning NULL

- Cheng
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-stack-overflow-in-ExecuteCommand.patch
Type: text/x-patch
Size: 2449 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20111215/dbb7c300/attachment.bin>

More information about the vlc-devel mailing list