We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d87c81f commit 1660887Copy full SHA for 1660887
pygetdns_util.c
@@ -955,9 +955,9 @@ convertBinData(getdns_bindata* data,
955
PyObject *a_string;
956
957
#if PY_MAJOR_VERSION >= 3
958
- if ((a_string = PyUnicode_FromStringAndSize((char *)data->data, (Py_ssize_t)(data->size-1))) == NULL) {
+ if ((a_string = PyUnicode_FromStringAndSize((char *)data->data, (Py_ssize_t)(data->size))) == NULL) {
959
#else
960
- if ((a_string = PyString_FromStringAndSize((char *)data->data, (Py_ssize_t)(data->size-1))) == NULL) {
+ if ((a_string = PyString_FromStringAndSize((char *)data->data, (Py_ssize_t)(data->size))) == NULL) {
961
#endif
962
PyErr_SetString(getdns_error, GETDNS_RETURN_GENERIC_ERROR_TEXT);
963
return NULL;
0 commit comments