Skip to content

Commit 2ac4355

Browse files
committed
ASM ClassReader leniently handles label offset mismatch (again)
Issue: SPR-17467
1 parent a3cd7af commit 2ac4355

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

spring-core/src/main/java/org/springframework/asm/ClassReader.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2437,6 +2437,11 @@ private void readCode(
24372437
* @return a non null Label, which must be equal to labels[bytecodeOffset].
24382438
*/
24392439
protected Label readLabel(final int bytecodeOffset, final Label[] labels) {
2440+
// SPRING PATCH: leniently handle offset mismatch
2441+
if (bytecodeOffset >= labels.length) {
2442+
return new Label();
2443+
}
2444+
// END OF PATCH
24402445
if (labels[bytecodeOffset] == null) {
24412446
labels[bytecodeOffset] = new Label();
24422447
}

0 commit comments

Comments
 (0)