From dd39d165e24cd47a9943a0049979e5d14a3afe94 Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Fri, 21 Oct 2016 19:19:06 +0000 Subject: [PATCH] #1247 Fix Linux/GCC compilation warning. Added Hanno's file to the test suite. --- src/image.cpp | 2 +- test/bugfixes-test.sh | 6 ++++++ test/data/bugfixes-test.out | Bin 1928308 -> 1928392 bytes test/data/exiv2-bug1247.jpg | Bin 0 -> 17 bytes 4 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 test/data/exiv2-bug1247.jpg diff --git a/src/image.cpp b/src/image.cpp index 94228280..66859c35 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -614,7 +614,7 @@ namespace Exiv2 { void Image::setIccProfile(Exiv2::DataBuf& iccProfile,bool bTestValid) { if ( bTestValid ) { - if ( iccProfile.pData_ && ( iccProfile.size_ < sizeof(long)) ) throw Error(53); + if ( iccProfile.pData_ && ( iccProfile.size_ < (long) sizeof(long)) ) throw Error(53); long size = iccProfile.pData_ ? getULong(iccProfile.pData_, bigEndian): -1; if ( size!= iccProfile.size_ ) throw Error(53); } diff --git a/test/bugfixes-test.sh b/test/bugfixes-test.sh index 8551e03f..8a76b4db 100755 --- a/test/bugfixes-test.sh +++ b/test/bugfixes-test.sh @@ -607,6 +607,12 @@ source ./functions.source copyTestFile $filename runTest exiv2 -pa $filename + num=1247 + printf "$num " >&3 + filename=exiv2-bug$num.jpg + copyTestFile $filename + runTest exiv2 -pa $filename + ) 3>&1 > $results 2>&1 printf "\n" diff --git a/test/data/bugfixes-test.out b/test/data/bugfixes-test.out index 633db14cae97c7df2113dbd675ab8a393a2347fd..ca12a10ecf04a9817e4f5fad64e122f9e0bf47da 100644 GIT binary patch delta 107 zcmexzqx8hh(uNks7N!>F7M2#)7Pc1l7LFFq7OocV7M>Q~7QPn#7J(MQ7NHj57LgXw z7O@ub7Ks+g7O58L7MU%wB{|c(w=)_k85)_G>tz+BTXFg2mnbAElqKe5rYLwiJ1Ybf L<)>xlq;dfO!?hy{ delta 67 zcmV~$-5Ejv006*`iV~tyemC^UyN4Ue5Jt!z4d8Cu=l^eB1VSfg7m?W2P2w(<$vqTG RPcLtkkFQ#z)#=w^8V@|u7LNb` diff --git a/test/data/exiv2-bug1247.jpg b/test/data/exiv2-bug1247.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c9b2be02868a6ea8629797df709877037d9948f3 GIT binary patch literal 17 Ycmex=