mirror of https://github.com/google/oss-fuzz.git
ofz#4860 fix off-by-one in ICU (#1092)
This commit is contained in:
parent
72c5de97b8
commit
c7012eeb7a
|
@ -53,6 +53,7 @@ tar -xzf $SRC/icu4c-60_2-src.tgz
|
|||
pushd icu/source
|
||||
patch -p2 < $SRC/icu4c-ubsan.patch
|
||||
patch -p3 < $SRC/ofz3670.patch
|
||||
patch -p3 < $SRC/ofz4860.patch
|
||||
./configure --disable-shared --enable-static --with-data-packaging=static --disable-dyload --disable-strict \
|
||||
--disable-layout --disable-samples --disable-extras --disable-icuio --disable-plugins \
|
||||
CPPFLAGS=-DU_USE_STRTOD_L=0
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
From 529ba01ee606940ca273b187be8ce9ba31cf2d90 Mon Sep 17 00:00:00 2001
|
||||
From: David Tardon <dtardon@redhat.com>
|
||||
Date: Fri, 19 Jan 2018 10:41:02 +0100
|
||||
Subject: [PATCH] ofz#4860 fix past-the-end read from array
|
||||
|
||||
---
|
||||
icu4c/source/common/locmap.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/icu4c/source/common/locmap.cpp b/icu4c/source/common/locmap.cpp
|
||||
index cbb2b810a..6d62d8310 100644
|
||||
--- a/icu4c/source/common/locmap.cpp
|
||||
+++ b/icu4c/source/common/locmap.cpp
|
||||
@@ -1015,7 +1015,7 @@ static const char*
|
||||
getPosixID(const ILcidPosixMap *this_0, uint32_t hostID)
|
||||
{
|
||||
uint32_t i;
|
||||
- for (i = 0; i <= this_0->numRegions; i++)
|
||||
+ for (i = 0; i < this_0->numRegions; i++)
|
||||
{
|
||||
if (this_0->regionMaps[i].hostID == hostID)
|
||||
{
|
||||
--
|
||||
2.14.3
|
||||
|
Loading…
Reference in New Issue