summaryrefslogtreecommitdiff
path: root/libavcodec/tiff.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-17 20:58:08 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-17 20:58:08 +0200
commitd185c8a79bbdcabef4e4cf9efa1bccbe0f9ebf41 (patch)
treeca6e32e15cd0353c650b5fc6a916f7a7de0227cf /libavcodec/tiff.c
parentf03c0f6afcb1360c95e92cf9278a8f43ca5cdb9f (diff)
tiff: run strlen() after setting the pointer
Fixes CID733803 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/tiff.c')
-rw-r--r--libavcodec/tiff.c3
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;