[Python-bugs-list] [ python-Bugs-480384 ] UMR in curses module

noreply@sourceforge.net noreply@sourceforge.net
Sun, 11 Nov 2001 06:50:57 -0800


Bugs item #480384, was opened at 2001-11-10 09:02
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=480384&group_id=5470

Category: Extension Modules
Group: Python 2.2
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Neal Norwitz (nnorwitz)
Assigned to: Nobody/Anonymous (nobody)
Summary: UMR in curses module

Initial Comment:
passing &char as a null terminated string
results in uninitialized memory reads

change char to char[2] and null-terminate
the array

----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2001-11-11 06:50

Message:
Logged In: YES 
user_id=21627

Thanks for the report. I've checked in the AndSize version
as _cursesmodule.c 2.60, since it is the smaller change, and
since it saves a strlen call (inside FromString).

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2001-11-11 06:30

Message:
Logged In: YES 
user_id=33168

Using FromStringAndSize also fixes the problem.

I don't know which is better, but
FromStringAndSize is a smaller change
(just change the function call and 
add 1 as the second parameter)

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2001-11-11 06:21

Message:
Logged In: YES 
user_id=21627

Wouldn't it be better to use FromStringAndSize instead?

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=480384&group_id=5470