rizinorg / cutter

Free and Open Source Reverse Engineering Platform powered by rizin
https://cutter.re
GNU General Public License v3.0
15.93k stars 1.15k forks source link

XRefs window for a flag with very long name width is much greater than the screen width. #3300

Open XVilka opened 9 months ago

XVilka commented 9 months ago

Environment information

Describe the bug

Too long window containing the name of the flag goes beyond the edge of the screen, if the flag name is sufficiently long enough

image

To Reproduce

Steps to reproduce the behavior:

  1. Go to "Flags" widget
  2. Right click on any flag with very long name
  3. Select "XRefs"
  4. See error

Expected behavior

Cut the title/name to fit the screen properly.

karliss commented 9 months ago

The GUI still should be fixed on cutter side.

But maybe also automatically generated flag names for strings should limited on rizin side. I don't see the point in including x KB of xml file as a flag name for string. Possibly prefixed with a length and address when the length limit kicks in to help disambiguate them. That doesn't mean all flag names need to be limited, only automatically generated ones, user should still be allowed to set the name to whatever they want. For now also not suggesting anything for function or other symbol flags, since those are more likely to have somewhat reasonable size, mangled template names can be a bit crazy but nowhere near as bad as giant XML or other textfiles embedded as strings.