[Python-apps-commits] r5894 - in packages/pyrit/trunk/debian (3 files)

chrisk-guest at users.alioth.debian.org chrisk-guest at users.alioth.debian.org
Wed Jul 21 19:49:53 UTC 2010


    Date: Wednesday, July 21, 2010 @ 19:49:51
  Author: chrisk-guest
Revision: 5894

Add patch fixing a sporadically occurring error during unit tests

Added:
  packages/pyrit/trunk/debian/patches/0011-fix-list-index-error.patch
Modified:
  packages/pyrit/trunk/debian/changelog
  packages/pyrit/trunk/debian/patches/series

Modified: packages/pyrit/trunk/debian/changelog
===================================================================
--- packages/pyrit/trunk/debian/changelog	2010-07-21 18:42:12 UTC (rev 5893)
+++ packages/pyrit/trunk/debian/changelog	2010-07-21 19:49:51 UTC (rev 5894)
@@ -12,5 +12,6 @@
     - 0008-disable-optimizations-on-i386
     - 0009-exception-handling-fix
     - 0010-Add-SHA1-licensing-update-from-upstream
+    - 0011-fix-list-index-error
 
  -- Christian Kastner <debian at kvr.at>  Tue, 20 Jul 2010 20:47:58 +0200

Added: packages/pyrit/trunk/debian/patches/0011-fix-list-index-error.patch
===================================================================
--- packages/pyrit/trunk/debian/patches/0011-fix-list-index-error.patch	                        (rev 0)
+++ packages/pyrit/trunk/debian/patches/0011-fix-list-index-error.patch	2010-07-21 19:49:51 UTC (rev 5894)
@@ -0,0 +1,31 @@
+From: Luks Lueg <lukas.lueg at gmail.com>
+Date: Wed, 21 Jul 2010 15:26:38 +0200
+Subject: [PATCH] Fix list index error
+
+On very rare occasions, repeated use of a certain buffer (as it is done when
+running the unit tests) may raise an IndexError because an attempt is made to
+access a not-yet initilialized part of that buffer. This patch adds appropriate
+boundary checks.
+
+Last-Update: 2010-07-21
+
+Index: pyrit-0.3.0/cpyrit/_cpyrit_cpu.c
+===================================================================
+--- pyrit-0.3.0.orig/cpyrit/_cpyrit_cpu.c	2010-07-21 18:50:08.130035042 +0200
++++ pyrit-0.3.0/cpyrit/_cpyrit_cpu.c	2010-07-21 18:50:19.968641014 +0200
+@@ -1020,13 +1020,13 @@
+         if (self->keyscheme == HMAC_MD5_RC4)
+         {
+             fourwise_md5hmac(self->eapolframe, self->eapolframe_size, (unsigned char*)&kck, 16, (unsigned char*)&md5mics);
+-            for (j = 0; j < 4; j++)
++            for (j = 0; j < 4 && i + j < buffersize / 32; j++)
+                 if (memcmp(&md5mics[j], self->keymic, 16) == 0)
+                     solution_idx = i + j;
+         } else
+         {
+             fourwise_sha1hmac(self->eapolframe, self->eapolframe_size, (unsigned char*)&kck, 16, (unsigned char*)&sha1mics);
+-            for (j = 0; j < 4; j++)
++            for (j = 0; j < 4 && i + j < buffersize / 32; j++)
+                 if (memcmp(&sha1mics[j], self->keymic, 16) == 0)
+                     solution_idx = i + j;
+         }

Modified: packages/pyrit/trunk/debian/patches/series
===================================================================
--- packages/pyrit/trunk/debian/patches/series	2010-07-21 18:42:12 UTC (rev 5893)
+++ packages/pyrit/trunk/debian/patches/series	2010-07-21 19:49:51 UTC (rev 5894)
@@ -8,3 +8,4 @@
 0008-disable-optimizations-on-i386.patch
 0009-exception-handling-fix.patch
 0010-Add-SHA1-licensing-update-from-upstream.patch
+0011-fix-index-error.patch




More information about the Python-apps-commits mailing list