[vlc-devel] [PATCH] check for crazy values in rtsp npt range

Rémi Denis-Courmont remi at remlab.net
Thu Mar 15 16:17:54 CET 2012


Le mercredi 14 mars 2012 18:03:17 Sébastien Escudier, vous avez écrit :
> On Wed, 2012-03-14 at 17:44 +0200, Rémi Denis-Courmont wrote:
> > d_length is rounded to an integer.
> 
> Ha ok.
> Then I could do :
> 
> if(d_length-0.5 > INT64_MAX)
>     *pi64 = INT64_MAX;
> 
> to be safe ?

In any case, I don't think - 0.5 makes sense. That would require 65-bits 
precision from INT64_MAX, and 'double' does not even have that many bits.

-- 
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis



More information about the vlc-devel mailing list