Skip to content

Broken printing of strings containing quotes #42

@jtojnar

Description

@jtojnar

Describe the bug

When I try to decompile the same program as in #39, I get:

_fprintf (eax, "%s",%f,%f,%f,%f,%f\r\n");

The string is actually:

"%s",%f,%f,%f,%f,%f

This is how Ghidra decompiles it:

_fprintf(iStack_80, "\"%s\",%f,%f,%f,%f,%f\r\n", *(undefined4 *)(iStack_7c * 0x30 + 0x403000), 
         *(undefined4 *)(iStack_7c * 0x30 + 0x403008), 
         *(undefined4 *)(iStack_7c * 0x30 + 0x40300c), *(undefined4 *)(iVar4 + 0x403000), 
         *(undefined4 *)(iVar4 + 0x403004), 
         *(undefined8 *)((iStack_7c * 3 + 1) * 0x10 + 0x403008), 
         *(undefined8 *)(iStack_7c * 0x30 + 0x403020), 
         *(undefined8 *)(iStack_7c * 0x30 + 0x403028));

Component

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

Using jsdec 5412ea4

Reproduce via JSON (pddi)

jsdec-string.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions