[vlc-commits] demux: hls: strip invalid padding chars from attributes

Francois Cartegnie git at videolan.org
Tue Feb 20 16:13:36 CET 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Feb 20 15:49:38 2018 +0100| [698a857c775224e0c4c17e870fd8e2c31e6aa648] | committer: Francois Cartegnie

demux: hls: strip invalid padding chars from attributes

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=698a857c775224e0c4c17e870fd8e2c31e6aa648
---

 modules/demux/hls/playlist/Tags.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/modules/demux/hls/playlist/Tags.cpp b/modules/demux/hls/playlist/Tags.cpp
index f0ef338824..ef007ff3fe 100644
--- a/modules/demux/hls/playlist/Tags.cpp
+++ b/modules/demux/hls/playlist/Tags.cpp
@@ -216,7 +216,7 @@ void AttributesTag::parseAttributes(const std::string &field)
                 break;
             }
             else /* out of range */
-                return;
+                iss.get();
         }
 
         std::string attrname = oss.str();
@@ -240,6 +240,11 @@ void AttributesTag::parseAttributes(const std::string &field)
             {
                 b_quoted = !b_quoted;
             }
+            else if(!b_quoted && (c < '-' || c > 'z')) /* out of range */
+            {
+                iss.get();
+                continue;
+            }
 
             if(!iss.eof())
                 oss.put((char)iss.get());



More information about the vlc-commits mailing list