diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-06-25 17:13:21 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-06-25 17:13:21 +0200 |
| commit | 4f76b8075e8a6acd8fbaad8693ba456a0dcfc836 (patch) | |
| tree | 72475d41f125887960a395817f36a5aaa536c370 /python | |
| parent | 35c637e1d9a78fe88c935f3545f98f68b32403f4 (diff) | |
| download | python-apt-4f76b8075e8a6acd8fbaad8693ba456a0dcfc836.tar.gz | |
python/tag.cc: Return False for non-strings in 'TagSection.__contains__()'.
Diffstat (limited to 'python')
| -rw-r--r-- | python/tag.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/python/tag.cc b/python/tag.cc index 4fcdf067..1ad0a465 100644 --- a/python/tag.cc +++ b/python/tag.cc @@ -191,6 +191,8 @@ static PyObject *TagSecExists(PyObject *Self,PyObject *Args) static int TagSecContains(PyObject *Self,PyObject *Arg) { + if (PyString_Check(Arg) == 0) + return 0; const char *Name = PyString_AsString(Arg); const char *Start; const char *Stop; |
