aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-02-24 02:08:32 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-02-28 17:14:21 +0100
commitb9b0c96db7aa272163c1e819553a3a508f029649 (patch)
tree355f0c2680a199cad55e68b58549814722ad7daf
parent301ae25e999d9771a4ece0e3d6f0983797dcc65a (diff)
downloadffmpeg-b9b0c96db7aa272163c1e819553a3a508f029649.tar.gz
avformat/pcmdec: Fix NULL + 1
It is undefined behaviour. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-rw-r--r--libavformat/pcmdec.c3
1 files changed, 2 insertions, 1 deletions
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)