Commit b94e4acb authored by Janne Grunau's avatar Janne Grunau

cmdutils_read_file: increment *size after writing the trailing \0

Fixes CID732166.
parent ac9a8956
...@@ -1061,7 +1061,7 @@ int cmdutils_read_file(const char *filename, char **bufptr, size_t *size) ...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment