Don't accept null bytes in the key.

This commit is contained in:
Guido van Rossum 2002-06-10 19:46:18 +00:00
parent a861d552c3
commit 804cdca7ea

View file

@ -597,10 +597,9 @@ rotor_rotor(PyObject *self, PyObject *args)
{
Rotorobj *r;
char *string;
int len;
int num_rotors = 6;
if (!PyArg_ParseTuple(args, "s#|i:newrotor", &string, &len, &num_rotors))
if (!PyArg_ParseTuple(args, "s|i:newrotor", &string, &num_rotors))
return NULL;
r = rotorobj_new(num_rotors, string);