1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/openharmony-third_party_expat

Клонировать/Скачать
09-backport-CVE-2022-25314-Prevent-integer-overflow-in-copyString.patch 807
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
kangchongtao Отправлено 22.05.2023 13:47 4cdaefe
From efcb347440ade24b9f1054671e6bd05e60b4cafd Mon Sep 17 00:00:00 2001
From: Samanta Navarro <ferivoz@riseup.net>
Date: Tue, 15 Feb 2022 11:56:57 +0000
Subject: [PATCH] Prevent integer overflow in copyString
The copyString function is only used for encoding string supplied by
the library user.
---
lib/xmlparse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/xmlparse.c b/lib/xmlparse.c
index 4b43e613..a39377c2 100644
--- a/lib/xmlparse.c
+++ b/lib/xmlparse.c
@@ -7412,7 +7412,7 @@ getElementType(XML_Parser parser, const ENCODING *enc, const char *ptr,
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 */

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/openharmony-third_party_expat.git
git@api.gitlife.ru:oschina-mirror/openharmony-third_party_expat.git
oschina-mirror
openharmony-third_party_expat
openharmony-third_party_expat
master