mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-05-29 11:21:31 +00:00
Fixed a segfault for faux packages, which do not have the architecture field.
This commit is contained in:
parent
b1afe1ee3d
commit
e9afdfb2e0
@ -294,7 +294,7 @@ static PyObject *dpkgpackages_add_binary(dpkgpackages *self, PyObject *args) {
|
|||||||
|
|
||||||
pyString = PyList_GetItem(value, 4);
|
pyString = PyList_GetItem(value, 4);
|
||||||
if (pyString == NULL) return NULL;
|
if (pyString == NULL) return NULL;
|
||||||
pkg->arch_all = (!strcmp(PyString_AsString(pyString), "all") ? 1 : 0);
|
pkg->arch_all = (pyString == Py_None || strcmp(PyString_AsString(pyString), "all") ? 0 : 1);
|
||||||
|
|
||||||
pyString = PyList_GetItem(value, 5);
|
pyString = PyList_GetItem(value, 5);
|
||||||
if (pyString == NULL) return NULL;
|
if (pyString == NULL) return NULL;
|
||||||
@ -994,7 +994,7 @@ static PyObject *build_system(PyObject *self, PyObject *args) {
|
|||||||
|
|
||||||
pyString = PyList_GetItem(value, 4);
|
pyString = PyList_GetItem(value, 4);
|
||||||
if (pyString == NULL) continue;
|
if (pyString == NULL) continue;
|
||||||
pkg->arch_all = (!strcmp(PyString_AsString(pyString), "all") ? 1 : 0);
|
pkg->arch_all = (pyString == Py_None || strcmp(PyString_AsString(pyString), "all") ? 0 : 1);
|
||||||
|
|
||||||
pyString = PyList_GetItem(value, 5);
|
pyString = PyList_GetItem(value, 5);
|
||||||
if (pyString == NULL) continue;
|
if (pyString == NULL) continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user