Package: python-pytc / 0.8-3

10_allow_tcbdb_rangefwm_null_bytes Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From ab82504ff9e47fe40701f49c3b92e986aea2b0de Mon Sep 17 00:00:00 2001
From: SVN-Git Migration <python-modules-team@lists.alioth.debian.org>
Date: Thu, 8 Oct 2015 12:49:44 -0700
Subject: 10_allow_tcbdb_rangefwm_null_bytes

Patch-Name: 10_allow_tcbdb_rangefwm_null_bytes
---
 pytc.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/pytc.c b/pytc.c
index 743de3e..b3cedf0 100644
--- a/pytc.c
+++ b/pytc.c
@@ -1555,14 +1555,15 @@ PyTCBDB_rangefwm(PyTCBDB *self, PyObject *args, PyObject *keywds) {
   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()