summaryrefslogtreecommitdiff
path: root/dev-java/openj9-openjdk/files/openj9-j9utf8-fam.patch
blob: f45a5394ddf0bc907d55c510f9718cf406642ee2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
diff --git a/runtime/cfdumper/romdump.c b/runtime/cfdumper/romdump.c
index 5040c2c25..1cfcd36c7 100644
--- a/runtime/cfdumper/romdump.c
+++ b/runtime/cfdumper/romdump.c
@@ -154,7 +154,7 @@ addRegion(J9Pool *regionPool, UDATA offset, UDATA length, UDATA type, const char
 static UDATA
 getUTF8Length(J9UTF8 *utf8)
 {
-	UDATA length = sizeof(J9UTF8) + J9UTF8_LENGTH(utf8) - sizeof(J9UTF8_DATA(utf8));
+	UDATA length = sizeof(J9UTF8) + J9UTF8_LENGTH(utf8);
 	if (length & 1) {
 		length++;
 	}
diff --git a/runtime/oti/j9nonbuilder.h b/runtime/oti/j9nonbuilder.h
index c5705188d..e9babe227 100644
--- a/runtime/oti/j9nonbuilder.h
+++ b/runtime/oti/j9nonbuilder.h
@@ -3219,7 +3219,7 @@ typedef struct J9ClassLoader {
 
 typedef struct J9UTF8 {
 	U_16 length;
-	U_8 data[2];
+	U_8 data[];
 } J9UTF8;
 
 typedef struct J9ROMClass {