Репозитории ALT
S: | 2.10.4-alt1 |
5.1: | 2.7.8-alt3.M50P.1 |
4.1: | 2.7.2-alt1.M41.2 |
+updates: | 2.6.32-alt2.M41.2 |
4.0: | 2.7.2-alt1.M40.1 |
+updates: | 2.6.31-alt1 |
3.0: | 2.6.20-alt1 |
Группа :: Система/Библиотеки
Пакет: libxml2
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: libxml2-2.6.26-CVE-2008-4225.patch
Скачать
Скачать
--- tree.c.orig 2006-05-31 15:12:45.000000000 +0200
+++ tree.c 2008-11-12 15:58:48.000000000 +0100
@@ -14,7 +14,7 @@
#include "libxml.h"
#include <string.h> /* for memset() only ! */
-
+#include <limits.h>
#ifdef HAVE_CTYPE_H
#include <ctype.h>
#endif
@@ -6816,7 +6816,13 @@ xmlBufferResize(xmlBufferPtr buf, unsign
case XML_BUFFER_ALLOC_DOUBLEIT:
/*take care of empty case*/
newSize = (buf->size ? buf->size*2 : size + 10);
- while (size > newSize) newSize *= 2;
+ while (size > newSize) {
+ if (newSize > UINT_MAX / 2) {
+ xmlTreeErrMemory("growing buffer");
+ return 0;
+ }
+ newSize *= 2;
+ }
break;
case XML_BUFFER_ALLOC_EXACT:
newSize = size+10;