Commit 4b20b21b authored by Michael Niedermayer's avatar Michael Niedermayer

tiff: fix leak on error return in doubles2str()

Fixes CID733797
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 9ba2484e
......@@ -216,8 +216,10 @@ static char *doubles2str(double *dp, int count, const char *sep)
ap[0] = '\0';
for (i = 0; i < count; i++) {
unsigned l = snprintf(ap, component_len, "%f%s", dp[i], sep);
if(l >= component_len)
if(l >= component_len) {
av_free(ap0);
return NULL;
}
ap += l;
}
ap0[strlen(ap0) - strlen(sep)] = '\0';
......
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