forked from mindspore-Ecosystem/mindspore
16 lines
605 B
Plaintext
16 lines
605 B
Plaintext
diff -Npur libtiff-v4.2.0/libtiff/tif_dirread.c libtiff-v4.2.0-change/libtiff/tif_dirread.c
|
|
--- libtiff-v4.2.0/libtiff/tif_dirread.c 2020-12-20 02:44:58.000000000 +0800
|
|
+++ libtiff-v4.2.0-change/libtiff/tif_dirread.c 2022-03-21 19:27:48.016570736 +0800
|
|
@@ -5079,7 +5079,10 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEnt
|
|
_TIFFfree(data);
|
|
return(0);
|
|
}
|
|
- _TIFFmemcpy(o,data,(uint32)dp->tdir_count);
|
|
+ if (dp->tdir_count > 0 )
|
|
+ {
|
|
+ _TIFFmemcpy(o,data,(uint32)dp->tdir_count);
|
|
+ }
|
|
o[(uint32)dp->tdir_count]=0;
|
|
if (data!=0)
|
|
_TIFFfree(data);
|