[vlc-devel] [PATCH] DASH: prevent integer overflow

Hugo Beauzée-Luyssen beauze.h at gmail.com
Wed Feb 29 14:51:01 CET 2012


On Wed, Feb 29, 2012 at 2:35 PM, Frederic YHUEL <fyhuel at viotech.net> wrote:
> On Mon, Feb 27, 2012 at 3:07 PM, Frederic YHUEL <fyhuel at viotech.net> wrote:
>> On Mon, Feb 27, 2012 at 2:04 PM, Hugo Beauzée-Luyssen
>> <beauze.h at gmail.com> wrote:
>>> On Mon, Feb 27, 2012 at 2:00 PM, Hugo Beauzée-Luyssen
>>> <beauze.h at gmail.com> wrote:
>>>> On Mon, Feb 27, 2012 at 1:51 PM, Frederic YHUEL <fyhuel at viotech.net> wrote:
>>>>> On Mon, Feb 27, 2012 at 12:39 PM, Jean-Baptiste Kempf <jb at videolan.org> wrote:
>>>>>> On Thu, Feb 23, 2012 at 06:06:12PM +0100, Frederic YHUEL wrote :
>>>>>>> But actually, no, even in that case we should be safe.
>>>>>>
>>>>>> 10Gbps links exist.
>>>>>>
>>>>>
>>>>> Ok, the patch should probably be applied then :-)
>>>>>
>>>>> Best Regards,
>>>>>
>>>>
>>>> Hello,
>>>>
>>>> Patch doesn't apply anymore :(
>>>>
>>>> Regards,
>>>>
>>>
>>> A few remarks though :
>>> - I'd rather use a uint64_t rather than a unsigned long long, but I
>>> don't think it matters anymore.
>>
>> Ok. I never really understood when we should use one or the other, but
>> reasoning in terms of uint*_t is simpler.
>>
>>> - It seems the indentation is wrong
>>
>> I tried to stick with the same indentation, but it's not consistent
>> anyway (look at the "if" of this very file for instance)
>> In general, I find it's tricky in VLC to get a correct indentation,
>> since each module has a different one.
>>

I have to agree with you on this point :)

>>> - Wouldn't it be simpler just to store the bpsAvg in a uint64 ? I
>>> haven't check the side effects though.
>>>
>>
>
> Ok ok :-) Here is a new patch. I don't think there are side effects.
> At least it works well in my tests.
>

Applied,

Best regards,


-- 
Hugo Beauzée-Luyssen



More information about the vlc-devel mailing list