From fd30a00cb44dd45ba3f4fc1ec5a1cd176b6674d6 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 28 May 2015 09:14:28 +0200 Subject: [PATCH] proplib: fix a NULL pointer dereference when internalizing empty blobs. _prop_object_internalize_context_alloc: make sure that passed xml string is not NULL before derefering it a bit later. --- lib/portableproplib/prop_object.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/portableproplib/prop_object.c b/lib/portableproplib/prop_object.c index 335b0c6b..5e04e365 100644 --- a/lib/portableproplib/prop_object.c +++ b/lib/portableproplib/prop_object.c @@ -692,6 +692,9 @@ _prop_object_internalize_context_alloc(const char *xml) { struct _prop_object_internalize_context *ctx; + if (xml == NULL) + return NULL; + ctx = _PROP_MALLOC(sizeof(struct _prop_object_internalize_context), M_TEMP); if (ctx == NULL)