Function comments with backslashes modified on save+load

Offen
#8,686 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
cpp
Bereich
backend

Rechercherichtung

Start by locating how function comments are serialized and restored when a bndb is saved and reopened; the payload does not name a source file or test. Reproduce with the supplied comment containing \n and \\n, then compare the comment after successive save and reopen cycles. Done means saving and loading preserves the original comment text each time.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
C++
Sterne
1.3k
Forks
304
Ø Merge
2 T. 20 Std.
Gemergte PRs (30 T.)
10

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus Vector35/binaryninja-api

Alle Issues in Vector35/binaryninja-api

Ähnliche Issues

Weitere Issues zu C++

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.