[FFmpeg-devel] [PATCH v4] Parse cookies more correctly

Scott Moak scott.moak at mybrainoncode.com
Tue Feb 18 00:01:21 CET 2014


Signed-off-by: Scott Moak <scott.moak at mybrainoncode.com>
---
 libavformat/http.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/http.c b/libavformat/http.c
index 8462a3a..3d9563b 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -489,7 +489,7 @@ static int get_cookies(HTTPContext *s, char **cookies, const char *path,
             /* skip leading spaces */
             param += strspn(param, " ");
             /* skip trailing spaces */
-            if (param) {
+            if (strlen(param) > 0) {
                 while (0x20 == param[strlen(param) - 1]) {
                     param[strlen(param) - 1] = 0;
                 }
-- 
1.8.5.4



More information about the ffmpeg-devel mailing list