XbSymbolDatabase icon indicating copy to clipboard operation
XbSymbolDatabase copied to clipboard

BUG: Not checking if XRef has index or not.

Open RadWolfie opened this issue 6 years ago • 1 comments

https://github.com/Cxbx-Reloaded/XbSymbolDatabase/blob/d546b83d1493f7f249743a73e568f6da3b775b50/XbSymbolDatabase.c#L118

One thing I noticed, it is NOT checking if it has stored XRef. It will make attempt to store outside of the array. It is a serious bug. GetXRefEntry calls doesn't bother check it in current state by the way.

RadWolfie avatar May 05 '18 08:05 RadWolfie

It's could only ever be a bug if this function was called with an out-of-bounds index. Callers shouldn't do that. But sure, if it's possible to add an assertion for index validity, then by all means add it.

PatrickvL avatar May 05 '18 16:05 PatrickvL