[vlc-devel] [vlc-commits] demux: hls: fix truncated value (cid #1346923, #1313683)

Rémi Denis-Courmont remi at remlab.net
Fri Jan 1 18:59:27 CET 2016


Le 2015-12-31 23:51, git at videolan.org a écrit :
> vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu
> Dec 31 22:00:12 2015 +0100| 
> [7661da70f194138b645d3630d035b97830ef319c]
> | committer: Francois Cartegnie
>
> demux: hls: fix truncated value (cid #1346923, #1313683)
>
>> 
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7661da70f194138b645d3630d035b97830ef319c
> ---
>
>  modules/demux/hls/playlist/Tags.cpp |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/modules/demux/hls/playlist/Tags.cpp
> b/modules/demux/hls/playlist/Tags.cpp
> index 9c25fc4..fcbf57f 100644
> --- a/modules/demux/hls/playlist/Tags.cpp
> +++ b/modules/demux/hls/playlist/Tags.cpp
> @@ -78,8 +78,8 @@ std::pair<std::size_t,std::size_t>
> Attribute::getByteRange() const
>          is >> length;
>          if(!is.eof())
>          {
> -            char c = is.get();
> -            if(c == '@' && !is.eof())
> +            char c;
> +            if(is.get(c) && c == '@')

I assume that istream::get() operates like fgetc(). Then this 
completely fails to fix the bug at all. Same below.

If you can't be bothered to read the documentation and think long and 
hard enough to fix Coverity bugs (or otherwise), just DON'T.

We have already been through this earlier! I won't be spending HOURS of 
my FREE time AGAIN (sic) reviewing/cleaning up the Coverity report. So I 
guess I won't be looking at Coverity at all anymore. Thank you big time, 
not.

-- 
Rémi Denis-Courmont
http://www.remlab.net/


More information about the vlc-devel mailing list