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

Francois Cartegnie git at videolan.org
Thu Dec 31 22:51:56 CET 2015


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 == '@')
                 is >> offset;
         }
     }
@@ -97,8 +97,8 @@ std::pair<int, int> Attribute::getResolution() const
         is >> w;
         if(!is.eof())
         {
-            char c = is.get();
-            if(c == 'x' && !is.eof())
+            char c;
+            if(is.get(c) && c == 'x')
                 is >> h;
         }
     }



More information about the vlc-commits mailing list