Fixes: applying zero offset to null pointer
Signed-off-by: Michael Niedermayer <[email protected]>
---
libavutil/avstring.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavutil/avstring.c b/libavutil/avstring.c
index 2071dd36a59..875eb691db6 100644
--- a/libavutil/avstring.c
+++ b/libavutil/avstring.c
@@ -452,10 +452,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;
--
2.47.0
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".