diff options
author | Janne Grunau <janne-libav@jannau.net> | 2012-10-09 17:55:32 +0200 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2012-10-09 18:43:30 +0200 |
commit | b94e4acb4874843e914fd3cb8e089aff0756bb4a (patch) | |
tree | 6c544c1ba1b16020e09edc29b1b56deeea639c0d /cmdutils.c | |
parent | ac9a89562adcc09d213462830f4da728674958fb (diff) | |
download | ffmpeg-b94e4acb4874843e914fd3cb8e089aff0756bb4a.tar.gz |
cmdutils_read_file: increment *size after writing the trailing \0
Fixes CID732166.
Diffstat (limited to 'cmdutils.c')
-rw-r--r-- | cmdutils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmdutils.c b/cmdutils.c index 3ae48e4863..ac971df20a 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -1061,7 +1061,7 @@ int cmdutils_read_file(const char *filename, char **bufptr, size_t *size) ret = AVERROR_EOF; } else { ret = 0; - (*bufptr)[*size++] = '\0'; + (*bufptr)[(*size)++] = '\0'; } fclose(f); |