From 54ea46ce09ab2be15901240bf233845c92bf04af Mon Sep 17 00:00:00 2001 From: Francisco Oca <xyzthor@gmail.com> Date: Mon, 8 May 2017 02:07:49 -0700 Subject: [PATCH] Patch for CVE-2017-7698 --- swftools-0.9.2/lib/pdf/xpdf/Gfx.cc.orig 2017-12-28 23:41:31.464173918 -0500 +++ swftools-0.9.2/lib/pdf/xpdf/Gfx.cc 2017-12-28 23:42:27.690943552 -0500 @@ -3850,6 +3850,11 @@ void Gfx::doForm1(Object *str, Dict *res out->endTransparencyGroup(state); } + if (old_state != state) { + error(getPos(), "There's a form with uneven q and Q operations"); + exit(-1); + } + // restore base matrix for (i = 0; i < 6; ++i) { baseMatrix[i] = oldBaseMatrix[i];