From cd38fab63f6b0a7673f4f6145f63b8a13bf515ec Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Sun, 8 Nov 2020 17:34:30 +0000 Subject: [PATCH] LibGfx: add erroneous cases to GIF test suite --- Base/res/html/misc/gifsuite.html | 36 ++++++++++++++++++ ...ransparent_loop_frames_out_of_bounds-0.png | Bin 0 -> 298 bytes ...ransparent_loop_frames_out_of_bounds-1.png | Bin 0 -> 315 bytes ...ransparent_loop_frames_out_of_bounds-2.png | Bin 0 -> 329 bytes ...ransparent_loop_frames_out_of_bounds-3.png | Bin 0 -> 345 bytes ..._transparent_loop_frames_out_of_bounds.gif | Bin 0 -> 559 bytes .../html/misc/gifsuite_files/bad_lzw_data.gif | Bin 0 -> 1051 bytes 7 files changed, 36 insertions(+) create mode 100644 Base/res/html/misc/gifsuite_files/animated_transparent_loop_frames_out_of_bounds-0.png create mode 100644 Base/res/html/misc/gifsuite_files/animated_transparent_loop_frames_out_of_bounds-1.png create mode 100644 Base/res/html/misc/gifsuite_files/animated_transparent_loop_frames_out_of_bounds-2.png create mode 100644 Base/res/html/misc/gifsuite_files/animated_transparent_loop_frames_out_of_bounds-3.png create mode 100644 Base/res/html/misc/gifsuite_files/animated_transparent_loop_frames_out_of_bounds.gif create mode 100644 Base/res/html/misc/gifsuite_files/bad_lzw_data.gif diff --git a/Base/res/html/misc/gifsuite.html b/Base/res/html/misc/gifsuite.html index a1c1766392..fb9756561c 100644 --- a/Base/res/html/misc/gifsuite.html +++ b/Base/res/html/misc/gifsuite.html @@ -140,6 +140,42 @@ Transparent gif with 4 transparent frames, loops forever, restore previous + + + + + + + +

Erroneous test case: frame out-of-bounds. + The first frame is located at offset (200,0) and so is wholly outside of the bounds of the 100x100 GIF. + The last frame is partially out of bounds, located at (60,60) and of size (50,50).

+ +

Note that the GIF specification is unclear on what to do if a frame extends past the logical + screen of the GIF, therefore different renderers behave differently here:

+ + + + + + + + N/A + N/A + N/A + N/A + +

Erroneous test case:. Final frame contains bad LZW data and will fail to decode. + Decoder implementations are not under any obligation to render anything useful here, however they + should fail gracefully and not crash.

+ + + diff --git a/Base/res/html/misc/gifsuite_files/animated_transparent_loop_frames_out_of_bounds-0.png b/Base/res/html/misc/gifsuite_files/animated_transparent_loop_frames_out_of_bounds-0.png new file mode 100644 index 0000000000000000000000000000000000000000..1388953be140de5feaea77954772737ea69af7e9 GIT binary patch literal 298 zcmeAS@N?(olHy`uVBq!ia0y~yU`PRBMrH;E1}`0UaRvqkmUKs7M+SzC{oH>NSs54@ z6p}rHd>I(3)EF2VS{N99F)%PRykKA`HDF+PmB7GYHG_dcykO3*KpO@I2DSj75ZC@a z{r!9TzfP)WVqjokED7=pW^j0RBMrn!@^*J&=wOxgU|?WiFY)wsWq-oWC}1Y`zFA3x zfq_B9)5S5w;&gI?1nc4ik)EbN2Y&_z)(Qqj&BC337#J8-OI#yLQW8s2t&)pU6H8JV zj0}tnbPWx44GcpJ&8$pKtc;Ab4GgRd3>xNU>_X9yo1c=IR*74~#{(DG7#J8BJYD@< J);T3K0RVLE)e-c?47#I|i zJ%W507^>757#dm_7=AG@Ff_biU???UV0e|lz+g3lfkC`r&aOZk1_lPs0G|-o{yqKw z7gYWK|35TbSC)Z+fw3gWFPOpM*^M+1C&}C0g(;1@24pXLiKnkC`x9XaWO77T5O~onE)e-c?47#I|i zJ%W507^>757#dm_7=AG@Ff_biU???UV0e|lz+g3lfkC`r&aOZk1_lP60G|-o{yqKw z7gV*Md;S0a|5^F{a~K#Hm`Z~Df*BafCZDxnU|?WO@^*J&7Uc2y#K6G7UgGKN%Kn6# zQNT>>eY27X0|SGOr;B5V$MNI@308*#Qe2FSjTRd%3|yU%aL{84BlEhznP6zZ<;Ez$ z!0_~qrxw@ubUOwH2GtVRh?11Vl2ohYqSVBaR0bmhBLiJSLtO*I5JNL7QxhvABW(i% mD+7auxf#1qH00)|WTsW(*6{Jb1vUl-1_n=8KbLh*2~7Y@#aj#j literal 0 HcmV?d00001 diff --git a/Base/res/html/misc/gifsuite_files/animated_transparent_loop_frames_out_of_bounds-3.png b/Base/res/html/misc/gifsuite_files/animated_transparent_loop_frames_out_of_bounds-3.png new file mode 100644 index 0000000000000000000000000000000000000000..57ddb97f299183a6fef8c514dc32562c78fda782 GIT binary patch literal 345 zcmeAS@N?(olHy`uVBq!ia0y~yU`PRB7G?$phNd$e=?n}EEa{HEjtmSN`?>!lvNA9* zC?tCX`7$t6sWC7#v@kIIVqjosc)`F>YQVtoDuIE)Y6b&?c)^@qfi?^b4EzB;A+G&< z`u{JeYCre-!?T|M|Nr-&;S*u+up#mQlh}v%ymm}8o7Vo7b}WCq zRKshxk+9d>BF(NvGTIBL=*qhWiY$$}8E{i}&Ybyw;u#niR7+eVN>UO_QmvAUQWHy3 z8H@~!40H_*bqx$d49%=eO{|QJv<(cb3=A6PX6!=Ikei>9nO2Eg!^Z;`*cccX7(8A5 KT-G@yGywo*XlJ1S literal 0 HcmV?d00001 diff --git a/Base/res/html/misc/gifsuite_files/animated_transparent_loop_frames_out_of_bounds.gif b/Base/res/html/misc/gifsuite_files/animated_transparent_loop_frames_out_of_bounds.gif new file mode 100644 index 0000000000000000000000000000000000000000..0abc0ff5404175916995f7c5c90628583a34d464 GIT binary patch literal 559 zcmZ?wbhEHbOkqf2_`tx>zo(ypfkE*n3u_7kBZK09Za>$MU}whwS0gD_eSARQIz56%!9|aqms5ei$*DT!=bM*}mtL$DA-`tk!wIQox zkKE0j$}5*=TlX!OFL>g<)^q>1{acr(XfGen@87?F$NB&J0@n*zyD)S1{hsj7-&~OU zbHL`$0*{O=PTb&dKCJDor)#ik-JD%X3L+;o``z?BQa;^SK84q7qsZ|$OYJj_MEh2D z8ZSRL*QWZ{A5IfjMo^e?q<{jDi-C(ljzNy0;s1gv1_lNunHKE9`0CWQY$R)(2x|2n74im=#*!G^(z!HA*Z!?PZc3C2X3@ckb@4_Et< NMISqSwA5J{tN}~50Ez$r literal 0 HcmV?d00001 diff --git a/Base/res/html/misc/gifsuite_files/bad_lzw_data.gif b/Base/res/html/misc/gifsuite_files/bad_lzw_data.gif new file mode 100644 index 0000000000000000000000000000000000000000..a0a3debe5b2ac0614049612cc6d9dde23d19a1ae GIT binary patch literal 1051 zcmZ?wbhEHbOkqf2_`<-@zo)-{Z-4*3{s{*sOgKDY!jTCRk58OeLrgr@fgr?ZdR`pQca$Hhuc{=`()MV89I&f3jR953r;# zFfb_o=k{|A33hf2a5d61U}j`sV9)_s268pumBzLd;)8LQUiyxv!!bG{_^e#N@? zHShl)SWw`hBgNS4-1KomfKEWylY<^IY{zvJ85^tiCm5(Wo?znc-cThAGLC_Pf$_Gk zunU8ou*SQFaxSJCJx0#P&T`J`R!w&Qu1Pr}?0srXe3NIF^0iE7V4JhJlx=#)l9gGU zt-Pz&CxYBEK$tg;k$=Osc>Z1&Cc*9d0tDwfG49>JUvQVh)?>%`oz|T>v&nwN#WQPc z7hSuy%$n);gF_ax9$e$IVt@KznmOadR~JQ28ejcz@rKF$Zx2oDf8XZHVEGZAH;J zLrQaflHY_)*u(icg^SIm-Y{dM&I;Xh9Tkbasta9Pmu}P8(omJH6&ew?epS&b)6iBi zuibrFrxvZa;pq|1V7oh0qkC=+<4>1F<8_PXXeHeWb(wrL&Q(9?-`2xLPae4H+sUm{ zzC@d}2~A|@Vx7zv+b9+*AG1^{pTfCVKR`u6a1G1-BMWPLUM>C*oHya0Xi-6#x7?1u zpj#?dM*Dw5j9P_Ky4bC!g!zdY}I~r_72l!G^&GV)2J(Js=Y>EcR%7gs|8e03!dJ AcmMzZ literal 0 HcmV?d00001