[issue45178] Support for linking unnamed temporary files into filesystem on Linux

2021-09-12 Thread WGH
New submission from WGH : In Linux, it's possible to create an unnamed temporary file in a specified directory by using open with O_TMPFILE flag (as if it was created with random name and immediately unlinked, but atomically). Unless O_EXCL is specified, the file can be then linked

[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2021-09-12 Thread WGH
WGH added the comment: > My patch uses O_EXCL. It makes possible to use linkat() to create a path for > the temporary file (I didn't try it, but I read that it's possible). I don't > know if using O_EXCL should be the default. I think it is the other way around. Fro

[issue29444] Out-of-bounds buffer access in match_getslice_by_index

2017-02-04 Thread WGH
WGH added the comment: Python 2.7 (CPython and PyPy) and also PyPy's Python 3 adjust the indices, like my patch does, if that matters. -- ___ Python tracker <http://bugs.python.org/is

[issue29444] Out-of-bounds buffer access in match_getslice_by_index

2017-02-04 Thread WGH
Changes by WGH : -- keywords: +patch Added file: http://bugs.python.org/file46518/match_getslice_by_index.patch ___ Python tracker <http://bugs.python.org/issue29

[issue29444] Out-of-bounds buffer access in match_getslice_by_index

2017-02-04 Thread WGH
New submission from WGH: In [1]: import re In [2]: b = bytearray(b'A'*100) In [3]: m = re.search(b'A*', b) In [4]: m.group() Out[4]: b'' In [5]: del b[:] In

[issue25330] Docs for pkgutil.get_data inconsistent with semantics

2016-04-12 Thread WGH
WGH added the comment: I think it can even be considered a security bug. A classic path traversal. The fact that documentation falsely suggests that there's no such vulnerability is clearly not helping. Python 2.7 is affected as well, by the way. -- nosy:

[issue25936] Improve FastChildWatcher with WNOWAIT?

2015-12-23 Thread WGH
New submission from WGH: The problem with FastChildWatcher lies in the fact that it can accidentally reap processes that it doesn't watch. However, os module includes waitid function (since Python 3.3), and it has WNOWAIT flags, which means "return status, let process remain waitab