Commit c7921a48 authored by Martin Storsjö's avatar Martin Storsjö

libfdk-aacdec: Fix a boundary check

This avoids potential out of bounds writes, with potential future
versions of the library.

Bug-Id: CID 1254945
CC: libav-stable@libav.org
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent 2c3f29c4
...@@ -100,7 +100,7 @@ static int get_stream_info(AVCodecContext *avctx) ...@@ -100,7 +100,7 @@ static int get_stream_info(AVCodecContext *avctx)
for (i = 0; i < info->numChannels; i++) { for (i = 0; i < info->numChannels; i++) {
AUDIO_CHANNEL_TYPE ctype = info->pChannelType[i]; AUDIO_CHANNEL_TYPE ctype = info->pChannelType[i];
if (ctype <= ACT_NONE || ctype > FF_ARRAY_ELEMS(channel_counts)) { if (ctype <= ACT_NONE || ctype >= FF_ARRAY_ELEMS(channel_counts)) {
av_log(avctx, AV_LOG_WARNING, "unknown channel type\n"); av_log(avctx, AV_LOG_WARNING, "unknown channel type\n");
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment