1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avformat/pcmdec: Fix NULL + 1

It is undefined behaviour.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
Andreas Rheinhardt 2021-02-24 02:08:32 +01:00
parent 301ae25e99
commit b9b0c96db7

View File

@ -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)