This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 10ae2f0c7c18ae09f765f106116ddeb0da76a845
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Sat Nov 7 00:21:47 2026 +0100
Commit:     michaelni <[email protected]>
CommitDate: Thu Nov 19 02:29:52 2026 +0000

    avformat/httpcookie: split attributes at their first '=' and ignore unnamed 
ones
    
    av_strtok() skipped leading '=', so "=domain=x" was taken as a Domain.
    
    Fixes: cookie attributes without a name
---
 libavformat/httpcookie.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/libavformat/httpcookie.c b/libavformat/httpcookie.c
index f0d3f61bb9..369a367181 100644
--- a/libavformat/httpcookie.c
+++ b/libavformat/httpcookie.c
@@ -86,11 +86,13 @@ int ff_http_parse_set_cookie(const char *set_cookie, 
AVDictionary **cookie, AVDi
     ret = av_dict_set(cookie, trim(param), eql + 1, 0);
 
     while (ret >= 0 && (param = av_strtok(next_param, ";", &saveptr))) {
-        char *name, *value;
+        char *value = strchr(param, '=');
         next_param = NULL;
-        param += strspn(param, WHITESPACES);
-        if ((name = av_strtok(param, "=", &value)))
-            ret = av_dict_set(attributes, trim(name), value ? value : "", 0);
+        if (value)
+            *value++ = '\0';
+        param = trim(param);
+        if (*param)
+            ret = av_dict_set(attributes, param, value ? value : "", 0);
     }
 
     av_free(cstr);

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to