Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPAddressParseData stack overflow #87

Closed
FlorianWege opened this issue Jun 2, 2022 · 2 comments
Closed

IPAddressParseData stack overflow #87

FlorianWege opened this issue Jun 2, 2022 · 2 comments

Comments

@FlorianWege
Copy link

Hi,

while trying to store IPAddresses and IPAddressSeqRanges as Strings in a database using Hibernate, I have found that there is an infinite loop in the toString method in the (decompiled) IPAddressParseData

  public String toString() {
    StringBuilder builder = new StringBuilder();
    builder.append(this.getAddressParseData());
  AddressParseData getAddressParseData() {
    return this;
  }
  public StringBuilder append(Object obj) {
    return this.append(String.valueOf(obj));
  }
  public static String valueOf(Object obj) {
    return obj == null ? "null" : obj.toString();
  }

Kind regards

@seancfoley
Copy link
Owner

OK, yes, I can see the infinite loop. It is not clear to me how you managed to call IPAddressParseData.toString() - but it's certainly something that is easy to fix.

@seancfoley
Copy link
Owner

This was fixed in version 5.4.0. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants