mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/pcmdec: Fix NULL + 1
It is undefined behaviour. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
301ae25e99
commit
b9b0c96db7
|
@ -57,8 +57,9 @@ static int pcm_read_header(AVFormatContext *s)
|
||||||
len = strlen(mime_type);
|
len = strlen(mime_type);
|
||||||
while (options < mime_type + len) {
|
while (options < mime_type + len) {
|
||||||
options = strstr(options, ";");
|
options = strstr(options, ";");
|
||||||
if (!options++)
|
if (!options)
|
||||||
break;
|
break;
|
||||||
|
options++;
|
||||||
if (!rate)
|
if (!rate)
|
||||||
sscanf(options, " rate=%d", &rate);
|
sscanf(options, " rate=%d", &rate);
|
||||||
if (!channels)
|
if (!channels)
|
||||||
|
|
Loading…
Reference in New Issue