[issue9758] ioctl mutable buffer copying problem

2010-09-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Actually, writing a test ended up quite easy (by re-using an existing test in test_ioctl and simply enlarging its buffer). I've committed an updated patch in r84589 (3.x), r84590 (3.1) and r84591 (2.7). Thank you! -- resolution: -> fixed stage: -> c

[issue9758] ioctl mutable buffer copying problem

2010-09-04 Thread Brian Brazil
Brian Brazil added the comment: I'd already had a look around, and my knowledge of ioctls is not sufficient to answer that question but I suspect the answer is no. Does someone know of a ioctl that works across platforms, doesn't require specific hardware or privileges and that does some for

[issue9758] ioctl mutable buffer copying problem

2010-09-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Do you think there is a simple, generic way to test for this (see Lib/test/test_ioctl.py)? -- nosy: +pitrou ___ Python tracker ___

[issue9758] ioctl mutable buffer copying problem

2010-09-04 Thread Brian Brazil
Brian Brazil added the comment: The attached patch fixes this. -- keywords: +patch nosy: +bbrazil Added file: http://bugs.python.org/file18747/ioctl_1024_mutable.patch ___ Python tracker ___

[issue9758] ioctl mutable buffer copying problem

2010-09-03 Thread Grzegorz Kulewski
New submission from Grzegorz Kulewski : Hello, It looks like something is broken in ioctl in 3.2 when the supplied (mutable) bytearray is exactly 1024 bytes long - the result is not copied into the buffer after the ioctl succedes: def open_tuntap(type, name): TUN_TYPE = {