[issue21151] winreg.SetValueEx causes crash if value = None

2014-07-03 Thread Zachary Ware
Zachary Ware added the comment: Thanks to Dave for the report, eryksun for the suggestion, and John for the patch! I'm not sure why the test case doesn't fail on a regular test run on Python 3; it looks like BYTE *data starts out as NULL when Python is not in interactive mode, which makes no

[issue21151] winreg.SetValueEx causes crash if value = None

2014-07-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset f2e6c33ce3e9 by Zachary Ware in branch '2.7': Issue #21151: Fixed a segfault in the _winreg module. http://hg.python.org/cpython/rev/f2e6c33ce3e9 New changeset 0c5a1835af91 by Zachary Ware in branch '3.4': Issue #21151: Fixed a segfault in the winre

[issue21151] winreg.SetValueEx causes crash if value = None

2014-07-03 Thread Claudiu Popa
Changes by Claudiu Popa : -- nosy: +steve.dower, zach.ware priority: normal -> high ___ Python tracker ___ ___ Python-bugs-list mailin

[issue21151] winreg.SetValueEx causes crash if value = None

2014-06-26 Thread Claudiu Popa
Changes by Claudiu Popa : -- stage: patch review -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue21151] winreg.SetValueEx causes crash if value = None

2014-06-14 Thread Claudiu Popa
Claudiu Popa added the comment: Hi. You have some trailing whitespaces in the test file (run make patchcheck or python ../Tools/scripts/patchcheck.py). Except that, looks good to me. -- nosy: +Claudiu.Popa stage: -> patch review versions: +Python 3.5 -Python 3.4 __

[issue21151] winreg.SetValueEx causes crash if value = None

2014-04-16 Thread Dave Odell
Dave Odell added the comment: Patch works on my end. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue21151] winreg.SetValueEx causes crash if value = None

2014-04-14 Thread John Ehresman
John Ehresman added the comment: Here's a simple patch with a test. Oddly, the test doesn't fail before the fix is applied when run with rt.bat, but fails when run directly. -- keywords: +patch nosy: +jpe Added file: http://bugs.python.org/file34840/fix-none-value.diff ___

[issue21151] winreg.SetValueEx causes crash if value = None

2014-04-03 Thread eryksun
eryksun added the comment: In Py2Reg, the REG_BINARY (3) case sets `*retDataSize = 0` when the value is None: http://hg.python.org/cpython/file/04f714765c13/PC/winreg.c#l766 It doesn't modify *retDataBuf. Then in PySetValueEx, PyMem_DEL is called for the uninitialized address in data: http:

[issue21151] winreg.SetValueEx causes crash if value = None

2014-04-03 Thread Dave Odell
New submission from Dave Odell: Here's a small program that crashes Python 3. import winreg winreg.SetValueEx(winreg.HKEY_CURRENT_USER, 'Value', 0, 3, None) I get a 0xC374 exception (STATUS_HEAP_CORRUPTION) when trying to run this. Here's a stack dump: (snip) ntdll.dll!RtlpLogHeapFailure+