rizinorg / rizinorg/jsdec

Using `jsdec` with Cutter always fails to parse JSON output of it:

Open
#30 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
67
Forks
12
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
Before opening a bug report run rzpm install jsdec and verify it crashes also on the latest version.
A clear and concise description of what the bug is (if known).

Component

  • core
  • arm
  • avr
  • m68k
  • mips
  • ppc
  • sparc
  • v850
  • wasm
  • x86-64

Reproduce via JSON (pddi)

<pddi or pdd --issue JSON>

jsdec_30_pddi.txt.zip

Failed to parse JSON
TypeError: cannot read property 'type' of undefined
at [anon] (duk_hobject_props.c:2549) internal
at [anon] (libdec/annotation.js:140)
at [anon] (libdec/printer.js:141) preventsyield
at forEach () native strict preventsyield
at [anon] (libdec/printer.js:144)
at jsdec_main (jsdec-duk.js:112)
at eval (eval:1) preventsyield

Failed to parse JSON
TypeError: cannot read property 'type' of undefined
at [anon] (duk_hobject_props.c:2549) internal
at [anon] (libdec/annotation.js:140)
at [anon] (libdec/printer.js:141) preventsyield
at forEach () native strict preventsyield
at [anon] (libdec/printer.js:144)
at jsdec_main (jsdec-duk.js:112)
at eval (eval:1) preventsyield

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with rzpm install jsdec and the supplied PDD JSON, then trace the stack from libdec/annotation.js:140 through libdec/printer.js:141 and libdec/printer.js:144. Done means the supplied JSON no longer causes the cannot read property 'type' of undefined failure when used with Cutter.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
reverse-engineering
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.