fix: handle invalid string id during namespace resolution (#3107)

This commit is contained in:
Connor Tumbleson 2023-06-28 11:24:50 -04:00 committed by GitHub
parent 6ed458a428
commit 1e400aa995
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -289,7 +289,7 @@ public class AXmlResourceParser implements XmlResourceParser {
// unless the pkgId of the resource is private. We will grab the non-standard one.
String value = m_strings.getString(namespace);
if (value.length() == 0) {
if (value == null || value.length() == 0) {
ResID resourceId = new ResID(getAttributeNameResource(index));
if (resourceId.package_ == PRIVATE_PKG_ID) {
value = getNonDefaultNamespaceUri(offset);