[Commits] [wesnoth/wesnoth] afde82: Fix bug #23908 - Crash in SDL_BlitSurface caused b...

GitHub noreply at github.com
Fri Oct 30 08:46:30 UTC 2015


  Branch: refs/heads/sdl2
  Home:   https://github.com/wesnoth/wesnoth
  Commit: afde826f226aeb30d0eb677a83c465f1f5f7d243
      https://github.com/wesnoth/wesnoth/commit/afde826f226aeb30d0eb677a83c465f1f5f7d243
  Author: Andreas Löf <andreas at alternating.net>
  Date:   2015-10-30 (Fri, 30 Oct 2015)

  Changed paths:
    M src/game_initialization/multiplayer_configure.cpp
    M src/game_initialization/multiplayer_wait.cpp
    M src/widgets/file_menu.cpp
    M src/widgets/menu.cpp
    M src/widgets/scrollpane.cpp
    M src/widgets/widget.cpp
    M src/widgets/widget.hpp

  Log Message:
  -----------
  Fix bug #23908 - Crash in SDL_BlitSurface caused by integer underflow

The font rendering code under SDL2 seems to deal poorly with silly
values being passed to it as a cause of integer over/underflows. This
commit changes the types used in gui1 from unsigned to signed for
width and height. This causes a number of statements that previously
inadvertedly did unsigned arithmetics without over/underflow checking
to be doing signed arithmetics instead, which is probably what the
author intended.





More information about the Commits mailing list