[vlc-commits] httplive: slightly more robust parsing of attributes

Eric Petit git at videolan.org
Wed Mar 21 14:36:42 CET 2012


vlc | branch: master | Eric Petit <eric at lapsus.org> | Wed Mar 21 10:48:57 2012 +0100| [7f55a6ea731d29fe69086f15e922c7bb234ac13f] | committer: Hugo Beauzée-Luyssen

httplive: slightly more robust parsing of attributes

This fixes playback on an AES-128 encrypted stream I ran into: the key
URL happened to have "iv" somewhere in it, which led VLC to try - and
fail - to parse an IV.

Signed-off-by: Hugo Beauzée-Luyssen <beauze.h at gmail.com>

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

 modules/stream_filter/httplive.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
index 6748ad2..a8dfc4b 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -484,7 +484,8 @@ static char *parse_Attributes(const char *line, const char *attr)
     begin = p;
     do
     {
-        if (strncasecmp(begin, attr, strlen(attr)) == 0)
+        if (strncasecmp(begin, attr, strlen(attr)) == 0
+          && begin[strlen(attr)] == '=')
         {
             /* <attr>=<value>[,]* */
             p = strchr(begin, ',');



More information about the vlc-commits mailing list