Created
December 2, 2011 09:23
-
-
Save abbas-obscurus/1422501 to your computer and use it in GitHub Desktop.
pytc rangefwm function now accept pefixes with embedded null bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- pytc.c.orig 2011-12-01 02:31:54.000000000 +0400 | |
+++ pytc.c 2011-12-01 02:32:21.000000000 +0400 | |
@@ -1555,14 +1555,15 @@ | |
int max; | |
TCLIST *list; | |
char *prefix; | |
+ int prefix_len; | |
static char *kwlist[] = {"prefix", "max", NULL}; | |
- if (!PyArg_ParseTupleAndKeywords(args, keywds, "si:rangefwm", kwlist, | |
- &prefix, &max)) { | |
+ if (!PyArg_ParseTupleAndKeywords(args, keywds, "s#i:rangefwm", kwlist, | |
+ &prefix, &prefix_len, &max)) { | |
return NULL; | |
} | |
Py_BEGIN_ALLOW_THREADS | |
- list = tcbdbrange3(self->bdb, prefix, max); | |
+ list = tcbdbfwmkeys(self->bdb, prefix, prefix_len, max); | |
Py_END_ALLOW_THREADS | |
TCLIST2PyList() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment