Commit 3fcaa79b authored by Jeff Huang's avatar Jeff Huang 🤔

[skip-ci] lib32-expat: update to 2.2.7

parent ebd4a09d
Pipeline #3782 skipped
From 29a11774d8ebbafe8418b4a5ffb4cc1160b194a1 Mon Sep 17 00:00:00 2001
From: Pascal Cuoq <cuoq@trust-in-soft.com>
Date: Sun, 15 May 2016 09:05:46 +0200
Subject: [PATCH] Avoid relying on undefined behavior in CVE-2015-1283 fix. It
does not really work: https://godbolt.org/g/Zl8gdF
---
expat/lib/xmlparse.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c
index 13e080d..cdb12ef 100644
--- a/expat/lib/xmlparse.c
+++ b/expat/lib/xmlparse.c
@@ -1693,7 +1693,8 @@ XML_GetBuffer(XML_Parser parser, int len)
}
if (len > bufferLim - bufferEnd) {
- int neededSize = len + (int)(bufferEnd - bufferPtr);
+ /* Do not invoke signed arithmetic overflow: */
+ int neededSize = (int) ((unsigned)len + (unsigned)(bufferEnd - bufferPtr));
if (neededSize < 0) {
errorCode = XML_ERROR_NO_MEMORY;
return NULL;
@@ -1725,7 +1726,8 @@ XML_GetBuffer(XML_Parser parser, int len)
if (bufferSize == 0)
bufferSize = INIT_BUFFER_SIZE;
do {
- bufferSize *= 2;
+ /* Do not invoke signed arithmetic overflow: */
+ bufferSize = (int) (2U * (unsigned) bufferSize);
} while (bufferSize < neededSize && bufferSize > 0);
if (bufferSize <= 0) {
errorCode = XML_ERROR_NO_MEMORY;
--
2.8.2
This diff is collapsed.
_pkgbasename=expat
pkgname=lib32-$_pkgbasename
pkgver=2.2.1
pkgver=2.2.7
pkgrel=1
pkgdesc="An XML Parser library written in C (32 bit)"
arch=('x86_64')
......@@ -9,7 +9,7 @@ license=('custom')
depends=('lib32-glibc' "${_pkgbasename}"="${pkgver}")
makedepends=('lib32-gcc-libs')
source=("http://downloads.sourceforge.net/sourceforge/expat/${_pkgbasename}-${pkgver}.tar.bz2")
md5sums=('d9c3baeab58774cefc2f04faf29f2cf8')
md5sums=('72f36b87cdb478aba1e78473393766aa')
build() {
cd "${srcdir}/${_pkgbasename}-${pkgver}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment