Skip to content
Snippets Groups Projects
Commit b9e0e953 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

nsvdec: Check av_malloc(string_size)


This can easily be NULL as string_size can be 2g in a damaged file.

Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 3a15051a
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment