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

Find a OutOfMemoryError which may lead to dos in hutool-json #2747

Closed
BIngDiAn-s opened this issue Nov 19, 2022 · 3 comments
Closed

Find a OutOfMemoryError which may lead to dos in hutool-json #2747

BIngDiAn-s opened this issue Nov 19, 2022 · 3 comments

Comments

@BIngDiAn-s
Copy link

版本情况

JDK版本: openjdk_8_201
hutool版本: 5.8.10(请确保最新尝试是否还有问题)

问题描述(包括截图)

  1. 复现代码
public static void main(String[] args)  {

String a="{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{'a':1}:1}:1}:1}:1}:1}:1}:1}:1}:1}:1}:1}:1}:1}:1}:1}:1}:1}:1}:1}:1}:1}:1}:1}:1}:1}:1}:1}:1}:1}";
JSONObject jsonObject=new JSONObject(a);

    }
  1. 堆栈信息

image

  1. 测试涉及到的文件(注意脱密)

比如报错的Excel文件,有问题的图片等。

@looly
Copy link
Member

looly commented Nov 29, 2022

和你提的:#2746 这个类似,合并issue。

@duhbbx
Copy link

duhbbx commented Dec 29, 2022

还有这种json?

@ZZemptypoint
Copy link
Collaborator

@duhbbx
当然, 它不是有效的json, 但是hutool并没有识别到它的非法, 而是抛了OOM错误, 所以它确实算是一个问题.

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

No branches or pull requests

4 participants