summaryrefslogtreecommitdiff
path: root/dev-java/openj9-openjdk/files/omr-omrstr-iconv-failure-overflow.patch
blob: f90c431c98afa835a07b1565eca69db2e289c214 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/port/common/omrstr.c b/port/common/omrstr.c
index ad76cdf93..f936f0026 100644
--- a/port/common/omrstr.c
+++ b/port/common/omrstr.c
@@ -3121,7 +3121,7 @@ convertPlatformToWide(struct OMRPortLibrary *portLibrary, charconvState_t encodi
 		} else if (E2BIG == errno) {
 			resultSize = (outBufferSize - wideBufferLimit); /* number of bytes written */
 		} else {
-			resultSize = OMRPORT_ERROR_STRING_ILLEGAL_STRING;
+			return OMRPORT_ERROR_STRING_ILLEGAL_STRING;
 		}
 	} else {
 		resultSize = (outBufferSize - wideBufferLimit); /* number of bytes written */