commit | 1adbf3784e3712440a7541b7dbc60f648b6e7918 | [log] [tgz] |
---|---|---|
author | Sadaf Ebrahimi <sadafebrahimi@google.com> | Mon May 23 22:34:43 2022 +0000 |
committer | android-t1 <xiaocong.gu@t2mobile.com> | Tue Sep 06 10:24:55 2022 +0800 |
tree | 3336ec1ebe08886ab8a09ffd4f69a871c16c8694 | |
parent | aceb92bf01c16df3a94958fb627e4b54870eaec2 [diff] [blame] |
Prevent integer overflow in copyString Bug: http://b/221384482 Change-Id: Ibdcb5dc24ee8886a04c2e29bd6ddccf29ece73ad (cherry picked from commit fe3486a743af350becbed5cf10a56195a4a8756f) Merged-In: Ibdcb5dc24ee8886a04c2e29bd6ddccf29ece73ad
diff --git a/lib/xmlparse.c b/lib/xmlparse.c index f598936..02bcfaa 100644 --- a/lib/xmlparse.c +++ b/lib/xmlparse.c
@@ -6894,7 +6894,7 @@ static XML_Char * copyString(const XML_Char *s, const XML_Memory_Handling_Suite *memsuite) { - int charsRequired = 0; + size_t charsRequired = 0; XML_Char *result; /* First determine how long the string is */