Changes between Initial Version and Version 1 of Ticket #12403, comment 1
- Timestamp:
- Mar 16, 2016, 3:41:31 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #12403, comment 1
initial v1 18 18 It seems `os.exec*` family disallows null bytes. 19 19 {{{ 20 $ LANG=C python -c "import os; os.execv('/bin/echo', ('/bin/echo', '123'))" 21 123 20 22 $ LANG=C python -c "import os; os.execv('/bin/echo', ('/bin/echo', '1\x0023'))" 21 23 Traceback (most recent call last): 22 24 File "<string>", line 1, in <module> 23 25 TypeError: execv() arg 2 must contain only strings 26 $ 27 $ LANG=en_US.UTF-8 python -c "import os; os.execv('/bin/echo', ('/bin/echo', '123'))" 28 123 24 29 $ LANG=en_US.UTF-8 python -c "import os; os.execv('/bin/echo', ('/bin/echo', '1\x0023'))" 25 30 Traceback (most recent call last):