From d185c8a79bbdcabef4e4cf9efa1bccbe0f9ebf41 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 17 Oct 2012 20:58:08 +0200 Subject: [PATCH] tiff: run strlen() after setting the pointer Fixes CID733803 Signed-off-by: Michael Niedermayer --- libavcodec/tiff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.11.0