simon-git: putty (pre-0.78): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Fri Oct 28 21:18:02 BST 2022


TL;DR:
  475c2387 Unix: stop accessing ctrl->fileselect for font selectors.

Repository:     https://git.tartarus.org/simon/putty.git
On the web:     https://git.tartarus.org/?p=simon/putty.git
Branch updated: pre-0.78
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2022-10-28 21:18:02

commit 475c23875e459525bad449b328e4a455e60a9178
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=475c23875e459525bad449b328e4a455e60a9178;hp=a7106d8eb26981a372ce7462d70d81a870a2a592
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Oct 28 17:49:59 2022 +0100

    Unix: stop accessing ctrl->fileselect for font selectors.
    
    The setup code for CTRL_FILESELECT and CTRL_FONTSELECT is shared,
    which means it's a mistake to test ctrl->fileselect.just_button in it
    without first checking which control type we're actually dealing with.
    
    UBsan picks this up by complaining that the just_button field contains
    some byte value that's illegal for a boolean. I think it's also the
    cause of an intermittent assertion failure reported recently, in which
    dlg_fontsel_set finds that uc->entry is NULL when it never ought to
    be. If the byte from the wrong union branch happened to be 0 by sheer
    bad luck, that could give rise to exactly that failure.

 unix/dialog.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)



More information about the tartarus-commits mailing list