Skip to content

Bad data in prefs not gracefully handled #9

@rbjacobs-jmc

Description

@rbjacobs-jmc

Executable used
(Not relevant)

Ghidra
Ghidra 11.4.2, public release

Describe the bug
When an invalid value is stored in prefs, the extension throws an exception when loading, and the user cannot easily get back to a working state.

I had the value "1e7000,25f000 " set as pref "OPTION_OVERRIDE_ADDRESSES" -- note the spaces after the values.

Having no idea where the prefs are stored, it was easier for me to fix the issue by modifying Options.java::218 to:
String addr = addresses[i].strip(); // strip added

That solved my immediate issue.

Thanks for making this extension! If I may be so bold as to ask a few things from you;
Please make a release for the current Ghidra version, so people can use it without having to go through installing gradle and building it themselves.
Please handle bad input in the options fields, so that bad options do not get stored in prefs
Please handle bad data in prefs by clearing it, so that the extension still gets properly loaded even with bad data in prefs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions