OpenSWE1R / openswe1r

An Open-Source port of the 1999 Game "Star Wars Episode 1: Racer"
https://openswe1r.github.io/
GNU General Public License v2.0
312 stars 26 forks source link

Avoid invalid memory access with resource pointers #172

Closed JayFoxRox closed 5 years ago

JayFoxRox commented 5 years ago

LoadIconA and LoadCursorA deal with resource pointers; these are either pointers into memory (if high-order word isn't zero), or they are resource identifiers (if high-order word is zero).

This is relevant as hacky_printf will access them (which possibly crashes).

The game only seems to use IDI_APPLICATION as resource identifier. More can be added if necessary.