[FFmpeg-cvslog] tiff: run strlen() after setting the pointer
Michael Niedermayer
git at videolan.org
Wed Oct 17 21:06:14 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Oct 17 20:58:08 2012 +0200| [d185c8a79bbdcabef4e4cf9efa1bccbe0f9ebf41] | committer: Michael Niedermayer
tiff: run strlen() after setting the pointer
Fixes CID733803
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d185c8a79bbdcabef4e4cf9efa1bccbe0f9ebf41
---
libavcodec/tiff.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index ad0b0ba..1f9a029 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;
More information about the ffmpeg-cvslog
mailing list