Skip to content

endless loop in Json Parse #38

@gambol

Description

@gambol

Code would go to an endless loop when get a big string. The stack are listed below

 at wf.bitcoin.krotjson.CrippledJavaScriptParser.parseJSHash(CrippledJavaScriptParser.java:156)
    at wf.bitcoin.krotjson.CrippledJavaScriptParser.parseJSExpr(CrippledJavaScriptParser.java:191)
    at wf.bitcoin.krotjson.CrippledJavaScriptParser.parseJSArray(CrippledJavaScriptParser.java:99)
    at wf.bitcoin.krotjson.CrippledJavaScriptParser.parseJSExpr(CrippledJavaScriptParser.java:189)
    at wf.bitcoin.krotjson.CrippledJavaScriptParser.parseJSHash(CrippledJavaScriptParser.java:146)
    at wf.bitcoin.krotjson.CrippledJavaScriptParser.parseJSExpr(CrippledJavaScriptParser.java:191)
    at wf.bitcoin.krotjson.CrippledJavaScriptParser.parseJSHash(CrippledJavaScriptParser.java:146)
    at wf.bitcoin.krotjson.CrippledJavaScriptParser.parseJSExpr(CrippledJavaScriptParser.java:191)
    at wf.bitcoin.krotjson.CrippledJavaScriptParser.parseJSExpr(CrippledJavaScriptParser.java:256)
    at wf.bitcoin.krotjson.JSON.parse(JSON.java:129)
    at wf.bitcoin.javabitcoindrpcclient.BitcoinJSONRPCClient.loadResponse(BitcoinJSONRPCClient.java:187)
    at wf.bitcoin.javabitcoindrpcclient.BitcoinJSONRPCClient.query(BitcoinJSONRPCClient.java:229)
    at wf.bitcoin.javabitcoindrpcclient.BitcoinJSONRPCClient.getRawTransaction(BitcoinJSONRPCClient.java:1283)

It would occurs every time when getRawTransaction("b6299d23e836d649a5a5012ebfebd2474b4d100d5334d7608d3c6c01b8204b45")

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions