Skip to content

Function comments with backslashes modified on save+load #8686

Open

Description

@comex

Version and Platform (required):

  • Binary Ninja Version: 6.1.10984-dev (7c2dfd74)
  • Edition: Commercial
  • OS: macOS
  • OS Version: 27.0.1 (26A434)
  • CPU Architecture: arm64

Bug Description:
When saving and loading a bndb, function comments get modified: text that looks like a backslash escape gets unescaped.

Steps To Reproduce:

  1. Open any binary
  2. Create a function comment (not applicable to other comments) with the text:
    foo:\\n bar:\n asdf
    -> At first the comment appears exactly as written (correctly).
  3. Save the bndb, close, and reopen.
    -> Now \n has been turned into a newline and \\n has been turned into \n.
  4. Save the bndb, close, and reopen.
    -> Now there are two newlines.

Expected Behavior:
Saving and loading shouldn't modify any state.

Activity

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

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