[FFmpeg-cvslog] avutil/avstring: dont mess with NULL pointers in av_match_list()
Michael Niedermayer
git at videolan.org
Fri May 16 20:58:49 EEST 2025
ffmpeg | branch: release/4.2 | Michael Niedermayer <michael at niedermayer.cc> | Wed Jan 15 03:30:21 2025 +0100| [a6599d510869b46fc1d7cb34b6de0da6f1771ba1] | committer: Michael Niedermayer
avutil/avstring: dont mess with NULL pointers in av_match_list()
Fixes: applying zero offset to null pointer
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit c6c54943d161812b3c4034116cb14f3f5c05dc43)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a6599d510869b46fc1d7cb34b6de0da6f1771ba1
---
libavutil/avstring.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavutil/avstring.c b/libavutil/avstring.c
index 4c068f5bc5..4ab608c2c9 100644
--- a/libavutil/avstring.c
+++ b/libavutil/avstring.c
@@ -451,10 +451,12 @@ int av_match_list(const char *name, const char *list, char separator)
if (k && (!p[k] || p[k] == separator))
return 1;
q = strchr(q, separator);
- q += !!q;
+ if(q)
+ q++;
}
p = strchr(p, separator);
- p += !!p;
+ if (p)
+ p++;
}
return 0;
More information about the ffmpeg-cvslog
mailing list