diff options
author | Janne Grunau <janne-libav@jannau.net> | 2012-10-09 19:55:32 +0400 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2012-10-09 20:43:30 +0400 |
commit | b94e4acb4874843e914fd3cb8e089aff0756bb4a (patch) | |
tree | 6c544c1ba1b16020e09edc29b1b56deeea639c0d | |
parent | ac9a89562adcc09d213462830f4da728674958fb (diff) |
cmdutils_read_file: increment *size after writing the trailing \0
Fixes CID732166.
-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); |