1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avformat/flvdec: Use appropriate error code

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
This commit is contained in:
Zhao Zhili
2025-03-11 10:49:47 +08:00
parent fa5a100ed2
commit 0f7d77fc42

View File

@ -489,7 +489,7 @@ static int amf_get_string(AVIOContext *ioc, char *buffer, int buffsize)
int length = avio_rb16(ioc); int length = avio_rb16(ioc);
if (length >= buffsize) { if (length >= buffsize) {
avio_skip(ioc, length); avio_skip(ioc, length);
return -1; return AVERROR_INVALIDDATA;
} }
ret = avio_read(ioc, buffer, length); ret = avio_read(ioc, buffer, length);