[vlc-devel] src/input: add a new input option flag to replace values of existing options (was: fix buffer underflow by avoiding inconsistent state in error case)

David Fuhrmann david.fuhrmann at gmail.com
Fri Jul 4 23:13:15 CEST 2014

Am 04.07.2014 um 23:03 schrieb Rémi Denis-Courmont <remi at remlab.net>:

> Le vendredi 4 juillet 2014, 22:53:22 David Fuhrmann a écrit :
>> I am talking about the p_input->ppsz_options array, which gets larger and
>> larger if you continue adding distinct „start-time=xy“ options. This is a
>> fact, and please look at the code for that. And this array is saved to the
>> media library, which was the reason to do the patch.
> The existing implementation is irrelevant. Your patch added a semantically 
> completely useless flag. If you didn't want the list to grow, just you just 
> could replace the existing item. That is obvious and that is what I have been 
> saying from the beginning.

Finally, I understand your point, after this discussion. This was not clear to me in the beginning, even if you think its obvious.

And actually, my patch was just doing what you are now saying - replacing an existing item. What was suboptimal is the form in how I integrated it. You could have been saying „please do not misuse this function, but write an extra one“, it would have been more clear from the start.


More information about the vlc-devel mailing list