Commit d185c8a7 authored by Michael Niedermayer's avatar Michael Niedermayer

tiff: run strlen() after setting the pointer

Fixes CID733803
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f03c0f6a
...@@ -208,8 +208,9 @@ static char *doubles2str(double *dp, int count, const char *sep) ...@@ -208,8 +208,9 @@ static char *doubles2str(double *dp, int count, const char *sep)
{ {
int i; int i;
char *ap, *ap0; char *ap, *ap0;
int component_len = 15 + strlen(sep); int component_len;
if (!sep) sep = ", "; if (!sep) sep = ", ";
component_len = 15 + strlen(sep);
ap = av_malloc(component_len * count); ap = av_malloc(component_len * count);
if (!ap) if (!ap)
return NULL; return NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment