Commit 369a1208 authored by Michael Niedermayer's avatar Michael Niedermayer

xbmdec: fix off by one error in scanf()

Fixes out of array access
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c40f51e1
......@@ -57,7 +57,7 @@ static int xbm_decode_frame(AVCodecContext *avctx, void *data,
int number, len;
ptr += strcspn(ptr, "#");
if (sscanf(ptr, "#define %256s %u", name, &number) != 2) {
if (sscanf(ptr, "#define %255s %u", name, &number) != 2) {
av_log(avctx, AV_LOG_ERROR, "Unexpected preprocessor directive\n");
return AVERROR_INVALIDDATA;
}
......
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