[vlc-devel] [PATCH] DASH: prevent integer overflow
fyhuel at viotech.net
Mon Feb 27 15:07:46 CET 2012
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,
>> Patch doesn't apply anymore :(
> 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.
> - Wouldn't it be simpler just to store the bpsAvg in a uint64 ? I
> haven't check the side effects though.
It would probably be cleaner, but when I saw that bpsAvg was
initialized to "-1" somewhere, I opted for this (lazy) solution :-)
I attached a new patch in case you want to apply it.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1943 bytes
Desc: not available
More information about the vlc-devel