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

Eric Petit eric at lapsus.org
Wed Mar 21 10:48:57 CET 2012


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.
---
 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, ',');
-- 
1.7.4.4




More information about the vlc-devel mailing list