[issue8592] 'y' does not check for embedded NUL bytes
STINNER Victor
report at bugs.python.org
Wed May 5 03:08:26 CEST 2010
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
Same issue for y#:
y# (...) This variant on s# doesn’t accept Unicode objects, only bytes-like objects.
s# (...) The string may contain embedded null bytes.
--
y* might mention that it accepts embedded null bytes.
--
grep 'PyArg_Parse[^"]\+"[^:;)"]*y[^*]' */*.c finds only usage of y# (no usage of y format):
- mmap_gfind(), mmap_write_method()
- oss_write(), oss_writeall()
- in getsockaddrarg() with s->sock_family==AF_PACKET
- in sock_setsockopt() if the option name is a string
- socket_inet_ntoa(), socket_inet_ntop()
These functions have to support embedded null bytes. So I think that y# should specify explicitly that embedded null bytes are accepted.
----------
nosy: +haypo
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8592>
_______________________________________
More information about the Python-bugs-list
mailing list