xbmdec: fix off by one error in scanf()
Fixes out of array access Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@ -59,7 +59,7 @@ static int xbm_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
int number, len;
|
int number, len;
|
||||||
|
|
||||||
ptr += strcspn(ptr, "#");
|
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");
|
av_log(avctx, AV_LOG_ERROR, "Unexpected preprocessor directive\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user