[vlc-devel] [PATCH] src: input/stream: fix buffer underflow by avoiding inconsistent state in error case

David Fuhrmann david.fuhrmann at gmail.com
Tue Jun 10 22:30:48 CEST 2014


Am 10.06.2014 um 22:24 schrieb Rémi Denis-Courmont <remi at remlab.net>:

> Le mardi 10 juin 2014, 22:12:34 David Fuhrmann a écrit :
>> In my opinion, as a start this patch actually makes the reader aware that
>> there might be a problem with an unsigned underflow at this place. This is
>> currently not easily spottable at all, because of the definition of the
>> variable types at different places. Additionally, I also can add some
>> comments, if you think its too confusing. And finally, it fixes a bug and
>> thus I propose to commit the fix, even if it might not be the absolutely
>> best solution.
> 
> The sign overflow part, yes. The refill hack, no way.

Actually, I’m fine to only committing the first chunk to fix the underflow for a start, as its sufficient for the bug. For refill, I will happily add a fixme so that devs which are more familiar with the code can fix it the correct way.

With best regards,
David


More information about the vlc-devel mailing list