diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-17 20:58:08 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-17 20:58:08 +0200 |
commit | d185c8a79bbdcabef4e4cf9efa1bccbe0f9ebf41 (patch) | |
tree | ca6e32e15cd0353c650b5fc6a916f7a7de0227cf | |
parent | f03c0f6afcb1360c95e92cf9278a8f43ca5cdb9f (diff) | |
download | ffmpeg-d185c8a79bbdcabef4e4cf9efa1bccbe0f9ebf41.tar.gz |
tiff: run strlen() after setting the pointer
Fixes CID733803
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/tiff.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index ad0b0bae5a..1f9a029556 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -208,8 +208,9 @@ static char *doubles2str(double *dp, int count, const char *sep) { int i; char *ap, *ap0; - int component_len = 15 + strlen(sep); + int component_len; if (!sep) sep = ", "; + component_len = 15 + strlen(sep); ap = av_malloc(component_len * count); if (!ap) return NULL; |