[Patches] [ python-Patches-602108 ] improper use of strncpy in getpath

noreply@sourceforge.net noreply@sourceforge.net
Tue, 03 Sep 2002 11:55:10 -0700


Patches item #602108, was opened at 2002-08-29 17:23
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=602108&group_id=5470

Category: Core (C code)
Group: Python 2.3
Status: Open
>Resolution: Rejected
Priority: 5
Submitted By: Neal Norwitz (nnorwitz)
>Assigned to: Neal Norwitz (nnorwitz)
Summary: improper use of strncpy in getpath

Initial Comment:
Many uses of strncpy() in Modules/getpath and
PC/getpathp do not copy the terminating null character
onto the string.  This patch makes sure the strings are
null terminated after strncpy().
Should this be backported?

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

>Comment By: Guido van Rossum (gvanrossum)
Date: 2002-09-03 14:55

Message:
Logged In: YES 
user_id=6380

Since the variables affected are all globals, there is
already a null byte in the final position. So there's no
need to write one explicitly. I therefore reject this patch.
I'm leaving it open in case I'm misunderstanding something.
If you agree, please close it.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=602108&group_id=5470