<pre style='margin:0'>
Ryan Schmidt (ryandesign) pushed a commit to branch master
in repository macports-ports.

</pre>
<p><a href="https://github.com/macports/macports-ports/commit/195b30a6e716508a15901dcc0e0817d5a44b0500">https://github.com/macports/macports-ports/commit/195b30a6e716508a15901dcc0e0817d5a44b0500</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 195b30a  icu: Help old compilers that can't compute sizeof(UTF8Buf::mapToUChars)
</span>195b30a is described below

<span style='display:block; white-space:pre;color:#808000;'>commit 195b30a6e716508a15901dcc0e0817d5a44b0500
</span>Author: Ryan Schmidt <git@ryandesign.com>
AuthorDate: Thu May 25 21:53:30 2017 -0500

<span style='display:block; white-space:pre;color:#404040;'>    icu: Help old compilers that can't compute sizeof(UTF8Buf::mapToUChars)
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    Closes: https://trac.macports.org/ticket/54209
</span>---
 devel/icu/Portfile                                |  1 +
 devel/icu/files/CVE-2017-7867-CVE-2017-7868.patch | 31 +++++++++++++----------
 2 files changed, 18 insertions(+), 14 deletions(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/icu/Portfile b/devel/icu/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 43121c8..2acc7ac 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/icu/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/icu/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -9,6 +9,7 @@ set my_name     icu4c
</span> # To find dependencies, use:
 # port file all | sort -u | xargs grep -El ':icu( |$)' | rev | cut -d / -f 2 | rev | sort -u
 version                     58.2
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# Don't update to 59 or later because they require C++11
</span> categories      devel textproc
 platforms       darwin freebsd
 maintainers                 {ryandesign @ryandesign} openmaintainer
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/icu/files/CVE-2017-7867-CVE-2017-7868.patch b/devel/icu/files/CVE-2017-7867-CVE-2017-7868.patch
</span><span style='display:block; white-space:pre;color:#808080;'>index 4e077ad..335d4a5 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/icu/files/CVE-2017-7867-CVE-2017-7868.patch
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/icu/files/CVE-2017-7867-CVE-2017-7868.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2,9 +2,9 @@ https://nvd.nist.gov/vuln/detail/CVE-2017-7867
</span> https://nvd.nist.gov/vuln/detail/CVE-2017-7868
 http://bugs.icu-project.org/trac/ticket/12888
 http://bugs.icu-project.org/trac/changeset/39671
<span style='display:block; white-space:pre;background:#ffe0e0;'>---- common/utext.cpp    (revision 39670)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ common/utext.cpp       (revision 39671)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -848,7 +848,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- common/utext.cpp.orig  2016-06-15 13:58:17.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ common/utext.cpp       2017-05-25 21:51:47.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -848,9 +848,16 @@
</span>  
  // Chunk size.
 -//     Must be less than 85, because of byte mapping from UChar indexes to native indexes.
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -21,20 +21,23 @@ http://bugs.icu-project.org/trac/changeset/39671
</span> +//     rather than obsolete lead bytes. But that is not compatible with the utf-8 access macros.
  //
  enum { UTF8_TEXT_CHUNK_SIZE=32 };
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -890,5 +896,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++enum { SIZEOF_MAPTOUCHARS=UTF8_TEXT_CHUNK_SIZE*6+6 };
</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;'>+@@ -890,5 +897,5 @@
</span>                                                       //    one for a supplementary starting in the last normal position,
                                                       //    and one for an entry for the buffer limit position.
 -    uint8_t   mapToUChars[UTF8_TEXT_CHUNK_SIZE*3+6]; // Map native offset from bufNativeStart to
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+    uint8_t   mapToUChars[UTF8_TEXT_CHUNK_SIZE*6+6]; // Map native offset from bufNativeStart to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++    uint8_t   mapToUChars[SIZEOF_MAPTOUCHARS];       // Map native offset from bufNativeStart to
</span>                                                       //   correspoding offset in filled part of buf.
      int32_t   align;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1033,4 +1039,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1033,4 +1040,5 @@
</span>              u8b = (UTF8Buf *)ut->p;   // the current buffer
              mapIndex = ix - u8b->toUCharsMapStart;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+            U_ASSERT(mapIndex < (int32_t)sizeof(UTF8Buf::mapToUChars));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++            U_ASSERT(mapIndex < (int32_t)SIZEOF_MAPTOUCHARS);
</span>              ut->chunkOffset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx;
              return TRUE;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1299,4 +1306,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1299,4 +1307,8 @@
</span>          //   If index is at the end, there is no character there to look at.
          if (ix != ut->b) {
 +            // Note: this function will only move the index back if it is on a trail byte
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -43,32 +46,32 @@ http://bugs.icu-project.org/trac/changeset/39671
</span> +            //       Otherwise the index remains unchanged.
              U8_SET_CP_START(s8, 0, ix);
          }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1312,5 +1323,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1312,5 +1324,8 @@
</span>          uint8_t *mapToNative = u8b->mapToNative;
          uint8_t *mapToUChars = u8b->mapToUChars;
 -        int32_t  toUCharsMapStart = ix - (UTF8_TEXT_CHUNK_SIZE*3 + 1);
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+        int32_t  toUCharsMapStart = ix - sizeof(UTF8Buf::mapToUChars) + 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++        int32_t  toUCharsMapStart = ix - SIZEOF_MAPTOUCHARS + 1;
</span> +        // Note that toUCharsMapStart can be negative. Happens when the remaining
 +        // text from current position to the beginning is less than the buffer size.
 +        // + 1 because mapToUChars must have a slot at the end for the bufNativeLimit entry.
          int32_t  destIx = UTF8_TEXT_CHUNK_SIZE+2;   // Start in the overflow region
                                                      //   at end of buffer to leave room
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1339,4 +1353,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1339,4 +1354,5 @@
</span>                  // Special case ASCII range for speed.
                  buf[destIx] = (UChar)c;
 +                U_ASSERT(toUCharsMapStart <= srcIx);
                  mapToUChars[srcIx - toUCharsMapStart] = (uint8_t)destIx;
                  mapToNative[destIx] = (uint8_t)(srcIx - toUCharsMapStart);
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1368,4 +1383,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1368,4 +1384,5 @@
</span>                      mapToUChars[sIx-- - toUCharsMapStart] = (uint8_t)destIx;
                  } while (sIx >= srcIx);
 +                U_ASSERT(toUCharsMapStart <= (srcIx+1));
  
                  // Set native indexing limit to be the current position.
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1542,4 +1558,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1542,4 +1559,5 @@
</span>      U_ASSERT(index<=ut->chunkNativeLimit);
      int32_t mapIndex = index - u8b->toUCharsMapStart;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+    U_ASSERT(mapIndex < (int32_t)sizeof(UTF8Buf::mapToUChars));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++    U_ASSERT(mapIndex < (int32_t)SIZEOF_MAPTOUCHARS);
</span>      int32_t offset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx;
      U_ASSERT(offset>=0 && offset<=ut->chunkLength);
 --- test/intltest/utxttest.cpp (revision 39670)
</pre><pre style='margin:0'>

</pre>