[New-bugs-announce] [issue23908] Check path arguments of os functions for null character

Serhiy Storchaka report at bugs.python.org
Fri Apr 10 18:43:52 CEST 2015


New submission from Serhiy Storchaka:

Proposed patch adds checks for null character in unicode path arguments of os functions on Windows. Null character is already tested on Unix, in bytes paths on Windows, and in unicode argument of _io.FileIO.

Removed private function _PyUnicode_HasNULChars(), because it is used only in two places and inlined code is simpler and more efficient.

The patch doesn't contain tests because I can't test them. But they should be simple, just pass a path with null character to os function.

----------
components: Extension Modules
files: path_converter_null_char.patch
keywords: patch
messages: 240435
nosy: haypo, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Check path arguments of os functions for null character
type: behavior
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file38890/path_converter_null_char.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23908>
_______________________________________


More information about the New-bugs-announce mailing list