[quake3-commits] [ioquake/ioq3] 3ad427: Fix q3history buffer not cleared between mods and ...

Zack Middleton zack at cloemail.com
Mon Apr 9 04:17:14 EDT 2018


  Branch: refs/heads/master
  Home:   https://github.com/ioquake/ioq3
  Commit: 3ad427c68dfa1bea18d9af14badb836e60641423
      https://github.com/ioquake/ioq3/commit/3ad427c68dfa1bea18d9af14badb836e60641423
  Author: Zack Middleton <zack at cloemail.com>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M code/client/cl_keys.c

  Log Message:
  -----------
  Fix q3history buffer not cleared between mods and OOB-access

Loading a 1024-byte q3history file will fill the whole consoleSaveBuffer
leaving no space for a string terminator. Com_Parse will read at least
one byte beyond the end of consoleSaveBuffer. The written console
history file can only be 1023 bytes (enforced by Q_strcat) so don't
allow loading size of 1024.

If switching to a mod with a shorter q3history file, the data in
consoleSaveBuffer that isn't overwritten will be parsed. So always
add a string terminator.

String not terminated reported by David "devnexen" CARLIER.




More information about the quake3-commits mailing list