Cxbx-Reloaded / XbSymbolCacheGenTest

Self-generated symbol cache and compare between virtual vs raw memory translation.
GNU General Public License v3.0
2 stars 3 forks source link

Segfault if no CLI arguments are passed #5

Open mborgerson opened 4 years ago

mborgerson commented 4 years ago

If no command line arguments are passed to the application, the application will segfault. The problem lies here: https://github.com/Cxbx-Reloaded/XbSymbolCacheGenTest/blob/6e9bb5e7e81d4f6c9b87a04133045ecaad76322b/src/XbSymbolCacheGenTest.cpp#L108 ...in which an out-of-bound access is made to argv[1].

PatrickvL commented 4 years ago

A solution could be to extend the argc-check a few lines upwards with argc < 1

RadWolfie commented 4 years ago

I don't have interest to maintenance this repo, feel free to send PR.

https://github.com/RadWolfie/XbSymbolUnitTest is the active development. However, it doesn't have a cache generated. It's still possible to re-add though.

EDIT: I see a valid point, from recent discord discussion, to have this draft concept into a functional design search tool / API showcase.