mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
nsvdec: Check av_malloc(string_size)
This can easily be NULL as string_size can be 2g in a damaged file. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
3a15051aba
commit
b9e0e9537a
@ -314,6 +314,8 @@ static int nsv_parse_NSVf_header(AVFormatContext *s, AVFormatParameters *ap)
|
||||
char quote;
|
||||
|
||||
p = strings = av_mallocz(strings_size + 1);
|
||||
if (!p)
|
||||
return AVERROR(ENOMEM);
|
||||
endp = strings + strings_size;
|
||||
avio_read(pb, strings, strings_size);
|
||||
while (p < endp) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user