diff options
author | Frank Warmerdam <warmerdam@pobox.com> | 2010-05-05 18:38:38 +0000 |
---|---|---|
committer | Frank Warmerdam <warmerdam@pobox.com> | 2010-05-05 18:38:38 +0000 |
commit | e3c51cb8e635a2e48dbebc737d90c99d26990947 (patch) | |
tree | 244094acafa391b99c66211cf1a63f9f4297a1db | |
parent | 80b552d22fe4a24d2b75970a95284804085055bd (diff) | |
download | libtiff-git-e3c51cb8e635a2e48dbebc737d90c99d26990947.tar.gz |
fix to use memcmp(), not memcpy() for checking jpeg tables header
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | libtiff/tif_jpeg.c | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2010-05-05 Frank Warmerdam <warmerdam@pobox.com> + + * libtiff/tif_jpeg.c: Fix to use memcmp(), not memcpy() when checking + if the jpeg table was written. This is a fix for the last fix on 04-21. + 2010-04-21 Frank Warmerdam <warmerdam@pobox.com> * libtiff/tif_jpeg.c: avoid preparing jpeg tables everytime diff --git a/libtiff/tif_jpeg.c b/libtiff/tif_jpeg.c index feba186e..aa4416d8 100644 --- a/libtiff/tif_jpeg.c +++ b/libtiff/tif_jpeg.c @@ -1,4 +1,4 @@ -/* $Id: tif_jpeg.c,v 1.89 2010-04-21 20:46:17 fwarmerdam Exp $ */ +/* $Id: tif_jpeg.c,v 1.90 2010-05-05 18:38:38 fwarmerdam Exp $ */ /* * Copyright (c) 1994-1997 Sam Leffler @@ -1613,7 +1613,7 @@ JPEGSetupEncode(TIFF* tif) /* Create a JPEGTables field if appropriate */ if (sp->jpegtablesmode & (JPEGTABLESMODE_QUANT|JPEGTABLESMODE_HUFF)) { if( sp->jpegtables == NULL - || memcpy(sp->jpegtables,"\0\0\0\0\0\0\0\0\0",8) == 0 ) + || memcmp(sp->jpegtables,"\0\0\0\0\0\0\0\0\0",8) == 0 ) { if (!prepare_JPEGTables(tif)) return (0); |