summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2012-10-09 17:55:32 +0200
committerJanne Grunau <janne-libav@jannau.net>2012-10-09 18:43:30 +0200
commitb94e4acb4874843e914fd3cb8e089aff0756bb4a (patch)
tree6c544c1ba1b16020e09edc29b1b56deeea639c0d
parentac9a89562adcc09d213462830f4da728674958fb (diff)
downloadffmpeg-streaming-b94e4acb4874843e914fd3cb8e089aff0756bb4a.zip
ffmpeg-streaming-b94e4acb4874843e914fd3cb8e089aff0756bb4a.tar.gz
cmdutils_read_file: increment *size after writing the trailing \0
Fixes CID732166.
-rw-r--r--cmdutils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmdutils.c b/cmdutils.c
index 3ae48e4..ac971df 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);
OpenPOWER on IntegriCloud