Closed interifter closed 3 years ago
I believe you may also need to change the type of the *_length
variables from unsigned long
to Py_ssize_t
here:
https://github.com/mongodb-labs/winkerberos/blob/master/src/winkerberos.c#L619-L623
You may need to add an overflow check when subsequently downcasting from Py_ssize_t
back to unsigned long
. See this change where we fixed the same issue in PyMongo:
https://github.com/mongodb/mongo-python-driver/pull/428#discussion_r341760226
Thanks for this patch. I'm going to merge it then add an additional patch to deal with the issue @ShaneHarvey mentions.
This has been merged to master. Thanks again.
Fix to remove
Issue ref: https://github.com/mongodb-labs/winkerberos/issues/37