From: Guido Draheim Date: Sun, 4 Feb 2018 22:01:53 +0000 (+0100) Subject: CVE 6381 not fatal #12 X-Git-Tag: v0.13.68~42 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f2433e371042a1b48e0fd4d07cb086380659e417;p=zziplib CVE 6381 not fatal #12 --- diff --git a/test/zziptests.py b/test/zziptests.py index 1b97e38..f7e1a5a 100644 --- a/test/zziptests.py +++ b/test/zziptests.py @@ -2720,7 +2720,6 @@ class ZZipTest(unittest.TestCase): self.assertLess(len(run.output), 1) self.assertLess(len(errors(run.errors)), 1) self.rm_testdir() - @unittest.expectedFailure def test_63813(self): """ unzzip-mix -l $(CVE).zip """ tmpdir = self.testdir() @@ -2729,9 +2728,9 @@ class ZZipTest(unittest.TestCase): download(file_url, filename, tmpdir) exe = self.bins("unzzip-mix") run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()), - returncodes = [0]) + returncodes = [0,2]) self.assertLess(len(run.output), 1) - self.assertLess(len(errors(run.errors)), 1) + self.assertTrue(grep(run.errors, "central directory not found")) self.rm_testdir() def test_63814(self): """ unzzip-zap -l $(CVE).zip """ @@ -2741,7 +2740,7 @@ class ZZipTest(unittest.TestCase): download(file_url, filename, tmpdir) exe = self.bins("unzzip") run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()), - returncodes = [0, 255]) + returncodes = [0,3]) self.assertLess(len(run.output), 1) self.assertLess(len(errors(run.errors)), 200) self.assertIn(": Success", run.errors) @@ -2789,7 +2788,6 @@ class ZZipTest(unittest.TestCase): # self.assertEqual(os.path.getsize(tmpdir+"/test"), 3) self.assertFalse(os.path.exists(tmpdir+"/test")) self.rm_testdir() - @unittest.expectedFailure def test_63818(self): """ unzzip-mix $(CVE).zip """ tmpdir = self.testdir() @@ -2798,13 +2796,12 @@ class ZZipTest(unittest.TestCase): download(file_url, filename, tmpdir) exe = self.bins("unzzip-mix") run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()), - returncodes = [0]) + returncodes = [0,2]) self.assertLess(len(run.output), 30) self.assertLess(len(errors(run.errors)), 10) # self.assertEqual(os.path.getsize(tmpdir+"/test"), 3) self.assertFalse(os.path.exists(tmpdir+"/test")) self.rm_testdir() - @unittest.expectedFailure def test_63819(self): """ unzzip $(CVE).zip """ tmpdir = self.testdir() @@ -2813,7 +2810,7 @@ class ZZipTest(unittest.TestCase): download(file_url, filename, tmpdir) exe = self.bins("unzzip") run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()), - returncodes = [0]) + returncodes = [0,3]) self.assertLess(len(run.output), 30) self.assertLess(len(errors(run.errors)), 10) # self.assertEqual(os.path.getsize(tmpdir+"/test"), 3)