From 035ddb6f551c759dd2dda24d5c108d58ff2e9bf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Mon, 7 Oct 2019 23:25:00 +0200 Subject: [PATCH] [tests] Add regression test for #1019 --- test/data/POC-file_issue_1019 | Bin 0 -> 10078 bytes tests/bugfixes/github/test_issue_1019.py | 14 ++++++++++++++ tests/suite.conf | 1 + 3 files changed, 15 insertions(+) create mode 100755 test/data/POC-file_issue_1019 create mode 100644 tests/bugfixes/github/test_issue_1019.py diff --git a/test/data/POC-file_issue_1019 b/test/data/POC-file_issue_1019 new file mode 100755 index 0000000000000000000000000000000000000000..0a237b3fd475c6dabe622f80c5ef0c40d3c95508 GIT binary patch literal 10078 zcmd^kc|28L_wYV z0(a05A3!lcXa)#wh4KJ^un-A;TMVJl7%Uk%1tpG(9-tsJ8ihe)u^0@}@(fZ3Fbr5m zJ{c`CCQCPR{^QKD=aX|O_GniZXk=|;YiEDZ!O_Fh>xj3HuV2WC(34@O!XsiXT#UVR`AS?$YFc_m=Jl-Xyu0}Y zg+;|BrPcRqYU}DBG(2p1*4ozI(fPcq?@j-};Lz~M==%>-(=)Sk^9zfsYhTtkzHWZ| z{sRK&9e0p&$D_aThXL^ig~6aPWuX@>FiDn;o<$En3FA08EpX<%OFTSl9(RVn`zTTi`sL4+&Sp=W72 zp+s``4Y|-j(-UK4sTsj)CoA?(8g6j#_$TRTv=lW|+~k%D7hlYn{vZ~q?0Ywo%{^W~ z%?60)MJi-ZurvVbBM(EknHhVXufOA|K664P=bZVlQljEs^icmGr;r|<(R9qFSyp9a z|N6Hn^EJPgysyGvimNVvew=tt^^nqL58u^Ggbm?WOPbKQ8ZP0=a$b6K{M18hio?sd zyROHwm>)N7sZ^_qv(r2P$sG#XE#}R!KmD|3gPPe&h=bw8+hx^-Ho;koeh)dvu2lKs zZLd@N2L;=T;{-hI)?P}tdMJ#=lrMB==8rbYwOQEm^$cbQGFM1hVaE?1Q?)<5o7M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i`IA9|C}9rkq3WQ zoSN5=i9vjSw|_2;;-ZMrA>;r3>$&+#T*0y%tyoc#Snr+u0f!>;NhLhvnb5d?+kH1} z)f9?VqCAvvO^lJM%d$5I@orfZ?ZaZ#c2_X99Ra0fAve$89#*4@^|8Ld`O)K=ZF5CC zUb;ms{By%-ud4I^SBCm}eZz_Li^jhT7J( z-5h+9%rfGW;rcQ8lD5kmGpk!hWyb!PF_YB=pB4u%mKM)zCm$)$X45RAYTfS) zwXsZ9D)K*6vqvk}jM4+%VE+Q6&?BVteiFtVjRPxN)DQog4+il5LVjRC*-S>9Qo!zGFsFL2#O-T2KGq41EljT0mgyf_awwR z8bm7bG)x2$i=AHpL@iLrcNGsb1jOixH%-JAlJvxCZRC-lC#KO9gpws4Yf=ynX@%Sf zrBDJOO@9QbNnrp$9=XXwZivqI)63BFBk#T;?-bbS5sH%$fOGU>2qlJ4HpoK*&=aDzs L$c>hmFaZApe(L&( literal 0 HcmV?d00001 diff --git a/tests/bugfixes/github/test_issue_1019.py b/tests/bugfixes/github/test_issue_1019.py new file mode 100644 index 0000000000..c2682f9012 --- /dev/null +++ b/tests/bugfixes/github/test_issue_1019.py @@ -0,0 +1,14 @@ +from system_tests import CaseMeta, path + + +class OverreadInCiffDirectoryReadDirectory(metaclass=CaseMeta): + + filename = path("$data_path/POC-file_issue_1019") + commands = ["$exiv2 -pv $filename"] + stdout = [""] + stderr = [ + """$exiv2_exception_message $filename: +$kerOffsetOutOfRange +""" + ] + retval = [1] diff --git a/tests/suite.conf b/tests/suite.conf index 5b31930c17..dab7427b32 100644 --- a/tests/suite.conf +++ b/tests/suite.conf @@ -19,6 +19,7 @@ largeiptc_test: ${ENV:exiv2_path}/largeiptc-test${ENV:binary_extension} easyaccess_test: ${ENV:exiv2_path}/easyaccess-test${ENV:binary_extension} [variables] +kerOffsetOutOfRange: Offset out of range kerFailedToReadImageData: Failed to read image data kerCorruptedMetadata: corrupted image metadata kerInvalidMalloc: invalid memory allocation request