Skip to content

Commit

Permalink
Prevent StackOverflowErrors when parsing the key property list (#269)
Browse files Browse the repository at this point in the history
Fixes #267

Signed-off-by: Auke van Leeuwen <[email protected]>
  • Loading branch information
aukevanleeuwen authored and brian-brazil committed Apr 30, 2018
1 parent 4e445a0 commit 48108e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@ class JmxMBeanPropertyCache {
"(" + // Either
"\"" + // Quoted
"(?:" + // A possibly empty sequence of
"[^\\\\\"]" + // Anything but backslash or quote
"|\\\\\\\\" + // or an escaped backslash
"|\\\\n" + // or an escaped newline
"|\\\\\"" + // or an escaped quote
"|\\\\\\?" + // or an escaped question mark
"|\\\\\\*" + // or an escaped star
"[^\\\\\"]*" + // Greedily match anything but backslash or quote
"(?:\\\\.)?" + // Greedily see if we can match an escaped sequence
")*" +
"\"" +
"|" + // Or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package io.prometheus.jmx;

import org.junit.Assert;
import org.junit.Test;

import javax.management.ObjectInstance;
import javax.management.ObjectName;
import java.util.*;

Expand Down

0 comments on commit 48108e3

Please sign in to comment.