This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: PyArg_ParseTupleAndKeywords does not respect arguments format.
Type: behavior Stage: resolved
Components: Extension Modules Versions: Python 3.3
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Claymore
Priority: normal Keywords:

Created on 2014-02-26 03:25 by Claymore, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg212236 - (view) Author: Carlos Ferreira (Claymore) Date: 2014-02-26 03:25
PyArg_ParseTupleAndKeywords is not respecting the format string "sy*ss"

When using the format "sbss" with the following valid arguments
"enp0s8", 0, "08:00:27:da:b3:47", "08:00:27:11:22:33"
there is no error and the function succeeds in parsing the arguments.

But when passing the following valid arguments,
"8bf2f93c-8f44-4960-a2de-71f87130882e", bytes(list([0,0,0,1])), "08:00:27:11:22:33", "10.0.0.3"
it will fail stating that the 3rd argument has a null character.
msg212238 - (view) Author: Carlos Ferreira (Claymore) Date: 2014-02-26 03:33
(Please ignore the previous post)

PyArg_ParseTupleAndKeywords is not respecting the format string "sy*ss"

When using the format "sbss" with the following valid arguments
"enp0s8", 0, "08:00:27:da:b3:47", "08:00:27:11:22:33"
there is no error and the function succeeds in parsing the arguments.

But when using the format "sy*ss" with the following valid arguments,
"8bf2f93c-8f44-4960-a2de-71f87130882e", bytes(list([0,0,0,1])), "08:00:27:11:22:33", "10.0.0.3"
it will fail stating that the 3rd argument has a null character.
msg212272 - (view) Author: Carlos Ferreira (Claymore) Date: 2014-02-26 16:07
Solved. This issue had nothing to do with Python API.
History
Date User Action Args
2022-04-11 14:57:59adminsetgithub: 64976
2014-02-27 14:22:48berker.peksagsetresolution: not a bug
stage: resolved
2014-02-26 16:07:56Claymoresetmessages: + msg212272
2014-02-26 03:33:54Claymoresetstatus: open -> closed

messages: + msg212238
2014-02-26 03:25:15Claymorecreate