Loading...
--- xnu/xnu-3248.50.21/libkern/c++/OSUnserializeXML.cpp
+++ xnu/xnu-3789.1.32/libkern/c++/OSUnserializeXML.cpp
@@ -2017,6 +2017,7 @@
if (c == '\n') state->lineNumber++;
if (c != '?') continue;
c = nextChar();
+ if (!c) return TAG_IGNORE;
if (c == '>') {
(void)nextChar();
return TAG_IGNORE;
@@ -2071,6 +2072,7 @@
values[*attributeCount][length++] = c;
if (length >= (TAG_MAX_LENGTH - 1)) return TAG_BAD;
c = nextChar();
+ if (!c) return TAG_BAD;
}
values[*attributeCount][length] = 0;