You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-python/pylibmc/files/pylibmc-1.6.1-fix-test-fail...

17 lines
516 B

diff --git a/src/_pylibmcmodule.c b/src/_pylibmcmodule.c
index 5324d1d..70c18cb 100644
--- a/src/_pylibmcmodule.c
+++ b/src/_pylibmcmodule.c
@@ -600,6 +600,11 @@ static PyObject *_PylibMC_parse_memcached_value(PylibMC_Client *self,
}
#endif
+ /* make sure we don't pass a null pointer to _PylibMC_deserialize_native */
+ if (value == NULL) {
+ value = "";
+ }
+
if (self->native_deserialization) {
retval = _PylibMC_deserialize_native(self, NULL, value, size, flags);
} else {