mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-18 05:24:42 +00:00
cmdutils_read_file: increment *size after writing the trailing \0
Fixes CID732166.
This commit is contained in:
parent
ac9a89562a
commit
b94e4acb48
@ -1061,7 +1061,7 @@ int cmdutils_read_file(const char *filename, char **bufptr, size_t *size)
|
|||||||
ret = AVERROR_EOF;
|
ret = AVERROR_EOF;
|
||||||
} else {
|
} else {
|
||||||
ret = 0;
|
ret = 0;
|
||||||
(*bufptr)[*size++] = '\0';
|
(*bufptr)[(*size)++] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
Loading…
Reference in New Issue
Block a user