summaryrefslogtreecommitdiffstats
path: root/Modules/spwdmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/spwdmodule.c')
-rw-r--r--Modules/spwdmodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/spwdmodule.c b/Modules/spwdmodule.c
index 556a715..1601ec0 100644
--- a/Modules/spwdmodule.c
+++ b/Modules/spwdmodule.c
@@ -134,6 +134,7 @@ spwd_getspnam_impl(PyObject *module, PyObject *arg)
if ((bytes = PyUnicode_EncodeFSDefault(arg)) == NULL)
return NULL;
+ /* check for embedded null bytes */
if (PyBytes_AsStringAndSize(bytes, &name, NULL) == -1)
goto out;
if ((p = getspnam(name)) == NULL) {