Martin v. Löwis <mar...@v.loewis.de> added the comment:

>      Applications should not assume a particular length for sun_path or
>      assume that it can hold {_POSIX_PATH_MAX} characters (255).
>
> hence, it seems to me that python should not actually be doing any size
> checks on the path passed to getsockaddrarg().

You are misinterpreting the specification. What they say is that the 
right way of doing it is the way Python currently does it.

"not assume a particular length" means "not assume, in the source code,
and specific fixed length, such as 108, or 255". Now, if the program 
must not assume any specific length, it must use sizeof instead to 
determine how large sun_path is.

If your operating system declares sun_path to be shorter than the 
strings it actually supports, complain to your operating system vendor 
that they fix their header files.

----------
nosy: +loewis
title: socketmodule.c`getsockaddrarg() should not check the length of sun_path 
-> socketmodule.c`getsockaddrarg() should not check the  length of sun_path

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8882>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to