<pre style='margin:0'>
Marius Schamschula (Schamschula) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/3ec26866f602b5e00a7efb460f2a5897d60c0a47">https://github.com/macports/macports-ports/commit/3ec26866f602b5e00a7efb460f2a5897d60c0a47</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 3ec2686 expat 2.2.1: use upstream patch.
</span>3ec2686 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 3ec26866f602b5e00a7efb460f2a5897d60c0a47
</span>Author: Marius Schamschula <mps@macports.org>
AuthorDate: Sat Jul 1 16:51:14 2017 -0500
<span style='display:block; white-space:pre;color:#404040;'> expat 2.2.1: use upstream patch.
</span>---
textproc/expat/Portfile | 1 +
textproc/expat/files/patch-lib-xmlparse.c.diff | 194 +++++--------------------
2 files changed, 36 insertions(+), 159 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/textproc/expat/Portfile b/textproc/expat/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index da45ae4..eb996fd 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/textproc/expat/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/textproc/expat/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4,6 +4,7 @@ PortSystem 1.0
</span>
name expat
version 2.2.1
<span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 1
</span> categories textproc devel
platforms darwin freebsd
maintainers ryandesign openmaintainer
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/textproc/expat/files/patch-lib-xmlparse.c.diff b/textproc/expat/files/patch-lib-xmlparse.c.diff
</span><span style='display:block; white-space:pre;color:#808080;'>index a73cadd..7fff349 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/textproc/expat/files/patch-lib-xmlparse.c.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/textproc/expat/files/patch-lib-xmlparse.c.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,161 +1,37 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- lib/xmlparse.c.orig 2017-06-17 11:07:38.000000000 -0500
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ lib/xmlparse.c 2017-06-20 20:28:38.000000000 -0500
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -623,7 +623,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define defaultExpandInternalEntities \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- (parser->m_defaultExpandInternalEntities)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define tagLevel (parser->m_tagLevel)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--#define buffer (parser->m_buffer)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#define xbuffer (parser->m_buffer)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define bufferPtr (parser->m_bufferPtr)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define bufferEnd (parser->m_bufferEnd)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define parseEndByteIndex (parser->m_parseEndByteIndex)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -901,7 +901,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (!parser)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return parser;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index d38c90d..cbc56b4 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- lib/xmlparse.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ lib/xmlparse.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -33,6 +33,17 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "expat.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "siphash.h"
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-- buffer = NULL;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ xbuffer = NULL;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- bufferLim = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(HAVE_GETRANDOM) || defined(HAVE_SYSCALL_GETRANDOM)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# include <errno.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# if defined(HAVE_GETRANDOM)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# include <sys/random.h> /* getrandom */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# include <unistd.h> /* syscall */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# include <sys/syscall.h> /* SYS_getrandom */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif /* defined(HAVE_GETRANDOM) || defined(HAVE_SYSCALL_GETRANDOM) */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef XML_UNICODE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define XML_ENCODE_MAX XML_UTF16_ENCODE_MAX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define XmlConvert XmlUtf16Convert
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -696,14 +707,6 @@ static const XML_Char implicitContext[] = {
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- attsSize = INIT_ATTS_SIZE;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1017,8 +1017,8 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- attlistDeclHandler = NULL;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- entityDeclHandler = NULL;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xmlDeclHandler = NULL;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- bufferPtr = buffer;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- bufferEnd = buffer;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ bufferPtr = xbuffer;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ bufferEnd = xbuffer;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- parseEndByteIndex = 0;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- parseEndPtr = NULL;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- declElementType = NULL;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1371,7 +1371,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- FREE((void *)attInfo);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- FREE(groupConnector);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- FREE(buffer);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ FREE(xbuffer);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- FREE(dataBuf);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- FREE(nsAtts);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- FREE(unknownEncodingMem);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1841,14 +1841,14 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- XmlUpdatePosition(encoding, positionPtr, end, &position);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- nLeftOver = s + len - end;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (nLeftOver) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- if (buffer == NULL || nLeftOver > bufferLim - buffer) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (xbuffer == NULL || nLeftOver > bufferLim - xbuffer) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* avoid _signed_ integer overflow */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char *temp = NULL;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- const int bytesToAllocate = (int)((unsigned)len * 2U);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (bytesToAllocate > 0) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- temp = (buffer == NULL
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ temp = (xbuffer == NULL
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ? (char *)MALLOC(bytesToAllocate)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- : (char *)REALLOC(buffer, bytesToAllocate));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ : (char *)REALLOC(xbuffer, bytesToAllocate));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (temp == NULL) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- errorCode = XML_ERROR_NO_MEMORY;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1856,13 +1856,13 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- processor = errorProcessor;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return XML_STATUS_ERROR;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- buffer = temp;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- bufferLim = buffer + bytesToAllocate;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ xbuffer = temp;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ bufferLim = xbuffer + bytesToAllocate;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- memcpy(buffer, end, nLeftOver);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ memcpy(xbuffer, end, nLeftOver);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- bufferPtr = buffer;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- bufferEnd = buffer + nLeftOver;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ bufferPtr = xbuffer;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ bufferEnd = xbuffer + nLeftOver;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- positionPtr = bufferPtr;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- parseEndPtr = bufferEnd;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- eventPtr = bufferPtr;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1969,23 +1969,23 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return NULL;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #ifdef XML_CONTEXT_BYTES
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- keep = (int)(bufferPtr - buffer);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ keep = (int)(bufferPtr - xbuffer);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (keep > XML_CONTEXT_BYTES)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- keep = XML_CONTEXT_BYTES;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- neededSize += keep;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #endif /* defined XML_CONTEXT_BYTES */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- if (neededSize <= bufferLim - buffer) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (neededSize <= bufferLim - xbuffer) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #ifdef XML_CONTEXT_BYTES
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- if (keep < bufferPtr - buffer) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- int offset = (int)(bufferPtr - buffer) - keep;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- memmove(buffer, &buffer[offset], bufferEnd - bufferPtr + keep);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (keep < bufferPtr - xbuffer) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ int offset = (int)(bufferPtr - xbuffer) - keep;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ memmove(xbuffer, &xbuffer[offset], bufferEnd - bufferPtr + keep);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- bufferEnd -= offset;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- bufferPtr -= offset;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #else
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- memmove(buffer, bufferPtr, bufferEnd - bufferPtr);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- bufferEnd = buffer + (bufferEnd - bufferPtr);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- bufferPtr = buffer;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ memmove(xbuffer, bufferPtr, bufferEnd - bufferPtr);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ bufferEnd = xbuffer + (bufferEnd - bufferPtr);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ bufferPtr = xbuffer;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #endif /* not defined XML_CONTEXT_BYTES */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2009,26 +2009,26 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- bufferLim = newBuf + bufferSize;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #ifdef XML_CONTEXT_BYTES
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (bufferPtr) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- int keep = (int)(bufferPtr - buffer);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ int keep = (int)(bufferPtr - xbuffer);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (keep > XML_CONTEXT_BYTES)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- keep = XML_CONTEXT_BYTES;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- memcpy(newBuf, &bufferPtr[-keep], bufferEnd - bufferPtr + keep);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- FREE(buffer);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- buffer = newBuf;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- bufferEnd = buffer + (bufferEnd - bufferPtr) + keep;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- bufferPtr = buffer + keep;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ FREE(xbuffer);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ xbuffer = newBuf;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ bufferEnd = xbuffer + (bufferEnd - bufferPtr) + keep;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ bufferPtr = xbuffer + keep;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- bufferEnd = newBuf + (bufferEnd - bufferPtr);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- bufferPtr = buffer = newBuf;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ bufferPtr = xbuffer = newBuf;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #else
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (bufferPtr) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- memcpy(newBuf, bufferPtr, bufferEnd - bufferPtr);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- FREE(buffer);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ FREE(xbuffer);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- bufferEnd = newBuf + (bufferEnd - bufferPtr);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- bufferPtr = buffer = newBuf;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ bufferPtr = xbuffer = newBuf;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #endif /* not defined XML_CONTEXT_BYTES */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- eventPtr = eventEndPtr = NULL;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2152,12 +2152,12 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #ifdef XML_CONTEXT_BYTES
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (parser == NULL)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return NULL;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- if (eventPtr && buffer) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (eventPtr && xbuffer) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (offset != NULL)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- *offset = (int)(eventPtr - buffer);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ *offset = (int)(eventPtr - xbuffer);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (size != NULL)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- *size = (int)(bufferEnd - buffer);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- return buffer;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ *size = (int)(bufferEnd - xbuffer);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ return xbuffer;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #else
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- (void)parser;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if defined(HAVE_GETRANDOM) || defined(HAVE_SYSCALL_GETRANDOM)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# include <errno.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# if defined(HAVE_GETRANDOM)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# include <sys/random.h> /* getrandom */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# include <unistd.h> /* syscall */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# include <sys/syscall.h> /* SYS_getrandom */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Obtain entropy on Linux 3.17+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static int
</span></pre><pre style='margin:0'>
</pre>