[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2009-01-12 Thread David Watson
New submission from David Watson : One of these problems interacts with the other, and can cause os.unsetenv() to free memory that's still in use. Firstly, calling os.putenv("FOO=BAR", "value") causes putenv(3) to be called with the string "FOO=BAR=value", wh

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2009-01-12 Thread David Watson
Changes by David Watson : Added file: http://bugs.python.org/file12709/2.x.diff ___ Python tracker <http://bugs.python.org/issue4926> ___ ___ Python-bugs-list mailin

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2009-01-12 Thread David Watson
Changes by David Watson : Added file: http://bugs.python.org/file12710/3.x.diff ___ Python tracker <http://bugs.python.org/issue4926> ___ ___ Python-bugs-list mailin

[issue1599254] mailbox: other programs' messages can vanish without trace

2014-03-23 Thread David Watson
David Watson added the comment: On Tue 18 Mar 2014, A.M. Kuchling wrote: > I suggest we apply the fix for #1, and for #2 just discard and > update the ToC when we lock the mailbox, ignoring other > possible routes to corruption (so no detecting the problem and > raising an E

[issue1599254] mailbox: other programs' messages can vanish without trace

2014-03-30 Thread David Watson
David Watson added the comment: On Sun 23 Mar 2014, David Watson wrote: > There actually isn't a test for the original locking issue, as > the tests all use the mailbox API, which doesn't provide a way to > turn off dot-locking. ... On second thought, the underlying error do

[issue1599254] mailbox: other programs' messages can vanish without trace

2014-05-01 Thread David Watson
David Watson added the comment: On Mon 28 Apr 2014, Jim Jewett wrote: > pinging David Watson: What is the status? If I understand correctly, (and I > may well not), you have already opened other issues for parts of this, and > (only) the final patch is ready for patch (and hopefull

[issue12837] Patch for issue #12810 removed a valid check on socket ancillary data

2013-12-05 Thread David Watson
David Watson added the comment: Looking again at cmsg_min_space(), I see that it already returns false when msg_controllen is less than cmsg_len_end, so you could do a (signed) comparison against that, rather than 0. Patch attached. -- Added file: http://bugs.python.org/file32992

[issue12837] Patch for issue #12810 removed a valid check on socket ancillary data

2013-12-15 Thread David Watson
David Watson added the comment: On Fri 13 Dec 2013, Brett Cannon wrote: > Two things. First, I'm sorry David but my mind is not working fully enough at > the moment to see how msg_controllen is compared to cmsg_len_end without > relying on external value coming in through the par

[issue20736] test_socket: testSendmsgDontWait needlessly skipped on Linux

2014-02-22 Thread David Watson
New submission from David Watson: In test_socket, the decorator on SendmsgStreamTests.testSendmsgDontWait still checks for the old sys.platform value of "linux2", with the result that the test is always skipped, when in fact the test is for a Linux facility. Patch attached for 3.3

[issue20669] OpenBSD: socket.recvmsg tests fail with OSError: [Errno 40] Message too long

2014-02-22 Thread David Watson
David Watson added the comment: > I opened the issue #20718 to track the "FD pass" failures. But the failures in the current issue *all* involve FD passing :) The "Message too long" errors are in tests where the ancillary data (in this case file descriptors) is tru

[issue6560] socket sendmsg(), recvmsg() methods

2009-12-14 Thread David Watson
David Watson added the comment: Hi, I'm afraid there may have been some duplication of effort here - I set about reworking Heiko Wundram's original patch (issue #1194378) without knowing about this one. I don't have unit tests yet either, but I saw this and thought I'd be

[issue6097] Encoded surrogate characters on command line not escaped in sys.argv

2009-05-24 Thread David Watson
New submission from David Watson : The mbstowcs and mbrtwoc functions which are used for the initial conversion of command-line arguments on Unix can return lone or paired surrogates (e.g. \udcff for \xed\xb3\xbf in non-strict UTF-8), and these surrogates are currently placed into sys.argv

[issue4859] pwd, spwd, grp functions vulnerable to denial of service

2009-05-24 Thread David Watson
David Watson added the comment: Patch to make get*nam() functions encode their arguments using the file system encoding and "surrogateescape" error handler, so that they correctly handle the user/group name fields returned by each other. -- Added file: http://bugs.python.org

[issue4859] pwd, spwd, grp functions vulnerable to denial of service

2009-05-24 Thread David Watson
David Watson added the comment: Patch to make pwd, spwd and grp decode their string fields using the file system encoding and the "surrogateescape" error handler, as per PEP 383. -- Added file: http://bugs.python.org/file14055/surrogateescape-f

[issue6560] socket sendmsg(), recvmsg() methods

2010-05-28 Thread David Watson
David Watson added the comment: Here is a new version of the patch; I've added some tests which use the RFC 3542 interface (IPv6 advanced API) and am now quite happy with it generally. As well as Linux, I've tested it on an old (unsupported) FreeBSD 5.3 installation, which requ

[issue6560] socket sendmsg(), recvmsg() methods

2010-06-02 Thread David Watson
David Watson added the comment: OK. I don't like creating/using a Google account, but here it is: http://codereview.appspot.com/1487041/show -- ___ Python tracker <http://bugs.python.org/i

[issue6560] socket sendmsg(), recvmsg() methods

2010-06-13 Thread David Watson
David Watson added the comment: New version with minor changes. Will also upload at http://codereview.appspot.com/1487041/show -- Added file: http://bugs.python.org/file17659/baikie-hwundram-v4.diff ___ Python tracker <http://bugs.python.

[issue6560] socket sendmsg(), recvmsg() methods

2010-06-13 Thread David Watson
David Watson added the comment: Optional patch to replace SocketTCPTest, etc. with the classes from the sendmsg patch. -- Added file: http://bugs.python.org/file17660/v4-replace-existing-classes.diff ___ Python tracker <http://bugs.python.

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2010-07-24 Thread David Watson
David Watson added the comment: Unit tests were in the patch! However, none of the patches applied any more, so I've updated them and also improved the tests a bit. Again, I haven't tried them on Windows. Unsetting a nonexistent variable isn't supposed to be an error (see PO

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2010-07-24 Thread David Watson
Changes by David Watson : Added file: http://bugs.python.org/file18186/putenv-empty-2.x.diff ___ Python tracker <http://bugs.python.org/issue4926> ___ ___ Python-bug

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2010-07-24 Thread David Watson
Changes by David Watson : Added file: http://bugs.python.org/file18187/putenv-equals-3.x.diff ___ Python tracker <http://bugs.python.org/issue4926> ___ ___ Python-bug

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2010-07-24 Thread David Watson
Changes by David Watson : Added file: http://bugs.python.org/file18188/putenv-empty-3.x.diff ___ Python tracker <http://bugs.python.org/issue4926> ___ ___ Python-bug

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2010-07-24 Thread David Watson
Changes by David Watson : Added file: http://bugs.python.org/file18189/visibility-2.x.diff ___ Python tracker <http://bugs.python.org/issue4926> ___ ___ Python-bugs-list m

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2010-07-24 Thread David Watson
Changes by David Watson : Added file: http://bugs.python.org/file18190/visibility-3.x.diff ___ Python tracker <http://bugs.python.org/issue4926> ___ ___ Python-bugs-list m

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2010-07-25 Thread David Watson
David Watson added the comment: You're having a bad day at the office :) Just use "patch -p1". -- ___ Python tracker <http://bugs.python.org/issue4926> ___ _

[issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names

2010-07-25 Thread David Watson
New submission from David Watson : The functions in the socket module which return host/domain names, such as gethostbyaddr() and getnameinfo(), are wrappers around byte-oriented interfaces but return Unicode strings in 3.x, and have not been updated to deal with undecodable byte sequences in

[issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names

2010-07-25 Thread David Watson
Changes by David Watson : Added file: http://bugs.python.org/file18196/try-surrogateescape-first.diff ___ Python tracker <http://bugs.python.org/issue9377> ___ ___ Pytho

[issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names

2010-07-29 Thread David Watson
David Watson added the comment: "Leaving IDNA ASCII-compatible encodings in ASCII form" is just preserving the existing behaviour (not doing IDNA decoding). See http://tools.ietf.org/html/rfc3490 and the docs for codecs -> encodings.idna ("xn--lzg" in the example i

[issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names

2010-07-30 Thread David Watson
David Watson added the comment: OK, here are new versions of the original patches. I've tweaked the docs to make clear that ASCII-compatible encodings actually *are* ASCII, and point to an explanation as soon as they're mentioned. You're right that PyUnicode_AsEncoded

[issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names

2010-07-30 Thread David Watson
Changes by David Watson : Added file: http://bugs.python.org/file18273/try-surrogateescape-first-2.diff ___ Python tracker <http://bugs.python.org/issue9377> ___ ___ Pytho

[issue9647] os.confstr() does not handle value changing length between calls

2014-12-07 Thread David Watson
David Watson added the comment: On Fri 5 Dec 2014, STINNER Victor wrote: > I added an assertion. Can we close this issue? Well, if no one complains about the interpreter dying with SIGABRT, that will suggest that the worries about OS bugs creating infinite loops were unfounded :) If you

[issue9647] os.confstr() does not handle value changing length between calls

2014-12-12 Thread David Watson
David Watson added the comment: Here are the alternative patches to allow more than two calls to confstr(). One patch set just keeps reallocating the buffer until it's big enough, while the other makes a limited number of attempts (in this case 20) before raising Runtime

[issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names

2015-06-25 Thread David Watson
David Watson added the comment: I've updated the ASCII/surrogateescape patches in line with various changes to Python since I posted them. return-ascii-surrogateescape-2015-06-25.diff incorporates the ascii-surrogateescape and uname-surrogateescape patches, and accept-ascii-surrogateescape

[issue20174] Derby #5: Convert 50 sites to Argument Clinic across 3 files

2015-08-02 Thread David Watson
Changes by David Watson : -- nosy: +baikie ___ Python tracker <http://bugs.python.org/issue20174> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24725] test_socket testFDPassEmpty fails on OS X 10.11 DP with "Cannot allocate memory"

2015-08-02 Thread David Watson
Changes by David Watson : -- nosy: +baikie ___ Python tracker <http://bugs.python.org/issue24725> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16263] sendmsg, recvmsg, recvmsg_into et al not being detected on Solaris

2015-08-02 Thread David Watson
Changes by David Watson : -- nosy: +baikie ___ Python tracker <http://bugs.python.org/issue16263> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20669] OpenBSD: socket.recvmsg tests fail with OSError: [Errno 40] Message too long

2015-04-16 Thread David Watson
David Watson added the comment: Sending multiple control messages at once isn't Linux-specific - the tests in question passed on FreeBSD. -- ___ Python tracker <http://bugs.python.org/is

[issue22397] test_socket failure on AIX

2015-04-16 Thread David Watson
Changes by David Watson : -- nosy: +baikie ___ Python tracker <http://bugs.python.org/issue22397> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23828] test_socket testCmsgTruncLen0 gets "received malformed or improperly-truncated ancillary data" warning under OS X

2015-04-16 Thread David Watson
David Watson added the comment: In this test (and nearby ones), the receiver provides too little space to receive the file descriptors that are sent, so that the control message has to be truncated if it is to be received at all. The warning may indicate that the cmsghdr struct received

[issue8372] socket: Buffer overrun while reading unterminated AF_UNIX addresses

2015-05-05 Thread David Watson
David Watson added the comment: I've rebased the patches onto all the currently released branches, but since there are now so many variations required, I've bundled the pass-unterminated and test patches into a single set (enable-unterminated-*), and the return-unterminated a

[issue8372] socket: Buffer overrun while reading unterminated AF_UNIX addresses

2015-05-06 Thread David Watson
David Watson added the comment: Attaching patches for 3.5. -- Added file: http://bugs.python.org/file39309/enable-unterminated-3.5-2015-05-06.diff Added file: http://bugs.python.org/file39310/fix-overrun-3.5-2015-05-06.diff ___ Python tracker <h

<    1   2