dethrace-labs / dethrace

Reverse engineering the 1997 game "Carmageddon"
https://twitter.com/dethrace_labs
GNU General Public License v3.0
669 stars 38 forks source link

segfault when no hires assets are available #325

Open madebr opened 1 year ago

madebr commented 1 year ago

When Dethrace is started in -hires mode, and no hires assets are available, the game segfaults.

Reproducer

  1. Download and extract the Carmageddon demo: it has no DATA/64X48X8 directory.
  2. Set DETHRACE_ROOT_DIR to the extract folder or cd to the extract folder
  3. Start dethrace with -hires

Actual behavior

Segfault when a unchecked NULL file handle is used.

Expected behavior

Error message telling -hires is not available, or fall back to lores.