simon-git: puzzles (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Wed Dec 25 06:51:55 GMT 2019


TL;DR:
  ce69911 Don't segfault when no icons are available.

Repository:     https://git.tartarus.org/simon/puzzles.git
On the web:     https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2019-12-25 06:51:55

commit ce69911077ce1399ae3626c9f66737c4586db18a
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=ce69911077ce1399ae3626c9f66737c4586db18a;hp=1c0c49dd5cd8df6ae87f7be5371be84589fa2662
Author: Asher Gordon <AsDaGo at posteo.net>
Date:   Tue Dec 24 00:44:30 2019 -0500

    Don't segfault when no icons are available.
    
    When no icons are available, n_xpm_icons will be 0, and
    menu_about_event() will try to access xpm_icons[n_xpm_icons-1]. Since
    n_xpm_icons is 0, this becomes xpm_icons[-1] which is an invalid
    value, causing a segfault.
    
    Instead, check if n_xpm_icons is 0, and if so, don't pass any icon to
    gtk_show_about_dialog().

 gtk.c | 33 +++++++++++++++++++++++----------
 1 file changed, 23 insertions(+), 10 deletions(-)



More information about the tartarus-commits mailing list