[FFmpeg-devel] [PATCH 06/15] avformat/pcmdec: Fix NULL + 1
Andreas Rheinhardt
andreas.rheinhardt at gmail.com
Wed Feb 24 13:53:32 EET 2021
It is undefined behaviour.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
---
libavformat/pcmdec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/pcmdec.c b/libavformat/pcmdec.c
index e65b535665..395d9ecf92 100644
--- a/libavformat/pcmdec.c
+++ b/libavformat/pcmdec.c
@@ -57,8 +57,9 @@ static int pcm_read_header(AVFormatContext *s)
len = strlen(mime_type);
while (options < mime_type + len) {
options = strstr(options, ";");
- if (!options++)
+ if (!options)
break;
+ options++;
if (!rate)
sscanf(options, " rate=%d", &rate);
if (!channels)
--
2.27.0
More information about the ffmpeg-devel
mailing list