am e40974d9
: Merge "Fix an overflow found by ASAN."
* commit 'e40974d92873462c4f1b100c7d03b3f41756c807': Fix an overflow found by ASAN.
This commit is contained in:
@ -553,7 +553,7 @@ static int validateAttr(const String8& path, const ResTable& table,
|
||||
String8(parser.getElementName(&len)).string(), attr);
|
||||
return ATTR_LEADING_SPACES;
|
||||
}
|
||||
if (str[len-1] == ' ') {
|
||||
if (len != 0 && str[len-1] == ' ') {
|
||||
fprintf(stderr, "%s:%d: Tag <%s> attribute %s can not end with a space.\n",
|
||||
path.string(), parser.getLineNumber(),
|
||||
String8(parser.getElementName(&len)).string(), attr);
|
||||
|
Reference in New Issue
Block a user