File: | adnsmodule.c |
Function: | interpret_hostaddr |
Error: | dereferencing NULL (addrs->ob_refcnt) at adnsmodule.c:181 |
162 static PyObject *
163 interpret_hostaddr(
164 adns_rr_hostaddr *hostaddr
165 )
166 {
167 PyObject *o, *addrs;
168 if (hostaddr->naddrs == -1) {
when treating unknown struct adns_rr_hostaddr * from adnsmodule.c:164 as non-NULL
when considering range: -0x80000000 <= value <= -2
taking False path
169 addrs = Py_None;
170 Py_INCREF(addrs);
171 } else {
172 int i;
173 addrs = PyTuple_New(hostaddr->naddrs);
when PyTuple_New() fails
174 for (i=0; i<hostaddr->naddrs; i++) {
when considering range: -0x80000000 <= value <= 0
taking False path
175 adns_rr_addr *v = hostaddr->addrs+i;
176 PyTuple_SET_ITEM(addrs,i,interpret_addr(v));
177 }
178 }
179 o = Py_BuildValue("siO", hostaddr->host, hostaddr->astatus,
when Py_BuildValue() fails
180 addrs);
181 Py_DECREF(addrs);
dereferencing NULL (addrs->ob_refcnt) at adnsmodule.c:181
182 return o;
183 }
File: | adnsmodule.c |
Function: | interpret_hostaddr |
Error: | dereferencing NULL (MEM[(struct PyTupleObject *)addrs].ob_item) at adnsmodule.c:174 |
162 static PyObject *
163 interpret_hostaddr(
164 adns_rr_hostaddr *hostaddr
165 )
166 {
167 PyObject *o, *addrs;
168 if (hostaddr->naddrs == -1) {
when treating unknown struct adns_rr_hostaddr * from adnsmodule.c:164 as non-NULL
when considering range: -0x80000000 <= value <= -2
taking False path
169 addrs = Py_None;
170 Py_INCREF(addrs);
171 } else {
172 int i;
173 addrs = PyTuple_New(hostaddr->naddrs);
when PyTuple_New() fails
174 for (i=0; i<hostaddr->naddrs; i++) {
when considering range: 1 <= value <= 0x7fffffff
taking True path
175 adns_rr_addr *v = hostaddr->addrs+i;
176 PyTuple_SET_ITEM(addrs,i,interpret_addr(v));
when interpret_addr() succeeds
dereferencing NULL (MEM[(struct PyTupleObject *)addrs].ob_item) at adnsmodule.c:174
found 1 similar trace(s) to this
177 }
178 }
179 o = Py_BuildValue("siO", hostaddr->host, hostaddr->astatus,
180 addrs);
181 Py_DECREF(addrs);
182 return o;
183 }