Commit 7661da70 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: hls: fix truncated value (cid #1346923, #1313683)

parent 1ff8d453
...@@ -78,8 +78,8 @@ std::pair<std::size_t,std::size_t> Attribute::getByteRange() const ...@@ -78,8 +78,8 @@ std::pair<std::size_t,std::size_t> Attribute::getByteRange() const
is >> length; is >> length;
if(!is.eof()) if(!is.eof())
{ {
char c = is.get(); char c;
if(c == '@' && !is.eof()) if(is.get(c) && c == '@')
is >> offset; is >> offset;
} }
} }
...@@ -97,8 +97,8 @@ std::pair<int, int> Attribute::getResolution() const ...@@ -97,8 +97,8 @@ std::pair<int, int> Attribute::getResolution() const
is >> w; is >> w;
if(!is.eof()) if(!is.eof())
{ {
char c = is.get(); char c;
if(c == 'x' && !is.eof()) if(is.get(c) && c == 'x')
is >> h; is >> h;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment