oss-fuzz/projects/dlplibs/ofz4860.patch

26 lines
780 B
Diff

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