From 2ba31e048a30e2d4f7e25d56950deadc217747e7 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 28 May 2015 09:34:03 +0200 Subject: [PATCH] proplib: check for EOF a bit early on the internalized plist. --- lib/portableproplib/prop_object.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/portableproplib/prop_object.c b/lib/portableproplib/prop_object.c index 5e04e365..8e9b02a1 100644 --- a/lib/portableproplib/prop_object.c +++ b/lib/portableproplib/prop_object.c @@ -707,6 +707,8 @@ _prop_object_internalize_context_alloc(const char *xml) * know about / care about. */ for (;;) { + if (_PROP_EOF(*xml)) + goto bad; while (_PROP_ISSPACE(*xml)) xml++; if (_PROP_EOF(*xml) || *xml != '<')