From a438651d2b94f14a2a0e54024f69280917df37b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 23 Feb 2017 12:17:33 +0000 Subject: [PATCH] ofz: don't loop endlessly on failed skip Change-Id: Ibc105d8156e1b1ddf22948fb02165f8d03b4cfd5 --- hwpfilter/qa/cppunit/data/fail/skipblock-1.hwp | Bin 0 -> 10225 bytes hwpfilter/source/hiodev.cxx | 8 ++++++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 hwpfilter/qa/cppunit/data/fail/skipblock-1.hwp diff --git a/hwpfilter/qa/cppunit/data/fail/skipblock-1.hwp b/hwpfilter/qa/cppunit/data/fail/skipblock-1.hwp new file mode 100644 index 0000000000000000000000000000000000000000..8fd8e7abf9fcd2632cc4ce8c48cf79175c6b1837 GIT binary patch literal 10225 zcmeHMc|6ry*Z=8uZv)Z2B{D>%NJ1*ZF?L-^nJPoBF+yaXPo{HkMWrYTIUy-B6e9Cf zk~mSEWS*zY!!dJ?cdy^6=Xu^g-_QFz|2@Cc$M3t=UVH7m*ZS_Y_c@(3)D`^0*~-(= z+Q~!kgq?%6purJwNl8H-mUTa^{~1HiPngWvJ%pP-3$NGSsJ&5mz3_U_Vi*ha_5b|K zg8K=@La|2d0A|U;{NVo404FhP%mICzF+ofRb3u|5dfT9n9cG23|33e>2uNX)=yMda zz9)#uU@5tR*fA_6PY|ICx$sVS{a1q^CWR4jJNPU0e;eSx*8h#b|04pon{+N4+rWwCE;bCs&=|I~aoCt&NhMq2xVCp{#%C%^BA620@PZT#URW$sx2 ziFTn_W#U>rEq3W#@xzrzlfE>0CEJPGBEP!!=PN{sBX|1TT4UFwsf(kN@icPsbW@i= z(9&9mU7>erlfT@fkHk@`$K+}^LnwCP>jQg<`CD(M3KfZYTnO)oO?>Og>QcbZ^VEBraXJ>-<9{Fs+H$B}4P?1BAZKhCJXc5cv3QCg+- zxm}pJu9q4X6&GYpy3FzTtbd`oN9Zl$hO;T5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