[Python-checkins] r51683 - in python/trunk: Misc/NEWS Modules/_cursesmodule.c

Neal Norwitz nnorwitz at gmail.com
Sat Sep 2 04:55:24 CEST 2006


I should note that I couldn't get a test for this to work.  That's why
there's no automated test.  Tested manually.

n
--

On 9/1/06, neal.norwitz <python-checkins at python.org> wrote:
> Author: neal.norwitz
> Date: Sat Sep  2 04:50:35 2006
> New Revision: 51683
>
> Modified:
>    python/trunk/Misc/NEWS
>    python/trunk/Modules/_cursesmodule.c
> Log:
> Bug #1548092: fix curses.tparm seg fault on invalid input.  Needs backport to 2.5.1 and earlier.
>
> Modified: python/trunk/Misc/NEWS
> ==============================================================================
> --- python/trunk/Misc/NEWS      (original)
> +++ python/trunk/Misc/NEWS      Sat Sep  2 04:50:35 2006
> @@ -25,6 +25,8 @@
>  Extension Modules
>  -----------------
>
> +- Bug #1548092: fix curses.tparm seg fault on invalid input.
> +
>
>  Tests
>  -----
>
> Modified: python/trunk/Modules/_cursesmodule.c
> ==============================================================================
> --- python/trunk/Modules/_cursesmodule.c        (original)
> +++ python/trunk/Modules/_cursesmodule.c        Sat Sep  2 04:50:35 2006
> @@ -2334,6 +2334,10 @@
>         }
>
>         result = tparm(fmt,i1,i2,i3,i4,i5,i6,i7,i8,i9);
> +       if (!result) {
> +               PyErr_SetString(PyCursesError, "tparm() returned NULL");
> +               return NULL;
> +       }
>
>         return PyString_FromString(result);
>  }
> _______________________________________________
> Python-checkins mailing list
> Python-checkins at python.org
> http://mail.python.org/mailman/listinfo/python-checkins
>


More information about the Python-checkins mailing list