XbSymbolDatabase
XbSymbolDatabase copied to clipboard
BUG: Not checking if XRef has index or not.
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.
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.