Annotation of pkgsrc/lang/python25/patches/patch-ce, revision 1.1
1.1 ! tron 1: $NetBSD$
! 2:
! 3: Patch for CVE-2008-3142 taken from Gentoo.
! 4:
! 5: --- Modules/selectmodule.c.orig 2006-07-10 02:18:57.000000000 +0100
! 6: +++ Modules/selectmodule.c 2008-08-30 10:39:43.000000000 +0100
! 7: @@ -349,10 +349,12 @@
! 8: {
! 9: Py_ssize_t i, pos;
! 10: PyObject *key, *value;
! 11: + struct pollfd *old_ufds = self->ufds;
! 12:
! 13: self->ufd_len = PyDict_Size(self->dict);
! 14: - PyMem_Resize(self->ufds, struct pollfd, self->ufd_len);
! 15: + PyMem_RESIZE(self->ufds, struct pollfd, self->ufd_len);
! 16: if (self->ufds == NULL) {
! 17: + self->ufds = old_ufds;
! 18: PyErr_NoMemory();
! 19: return 0;
! 20: }
CVSweb <webmaster@jp.NetBSD.org>