succeed for the python module.
- pythonmod logs the python error and traceback on failure.
- ignore debug python module for test in doxygen output.
+ - review fixes for python module.
21 November 2018: Wouter
- Scrub NS records from NODATA responses as well.
i = 0; cnt = 0;
while (i < len) {
char buf[LDNS_MAX_LABELLEN+1];
- if(((unsigned int)name[i])+1 <= (unsigned int)sizeof(buf)) {
+ if(((unsigned int)name[i])+1 <= (unsigned int)sizeof(buf) &&
+ i+(int)((unsigned int)name[i]) < len) {
memmove(buf, name + i + 1, (unsigned int)name[i]);
buf[(unsigned int)name[i]] = 0;
PyList_SetItem(list, cnt, PyString_FromString(buf));
modStringIO = PyImport_ImportModule("io");
if (modStringIO==NULL) {
log_err("pythonmod: cannot print exception, "
- "cannot ImportModule cStringIO or StringIO");
+ "cannot ImportModule cStringIO or StringIO or io");
goto cleanup;
}
modTB = PyImport_ImportModule("traceback");
obStringIO = PyObject_CallObject(obFuncStringIO, NULL);
if (obStringIO==NULL) {
log_err("pythonmod: cannot print exception, "
- "cannot cStringIO.StringIO()");
+ "cannot call cStringIO.StringIO()");
goto cleanup;
}
/* And it should be a string all ready to go - duplicate it. */
if (!PyString_Check(obResult) && !PyUnicode_Check(obResult)) {
log_err("pythonmod: cannot print exception, "
- "cStringIO.getvalue() result did not String_Check");
+ "cStringIO.getvalue() result did not String_Check"
+ " or Unicode_Check");
goto cleanup;
}
if(PyString_Check(obResult)) {