wok-current diff xorg-server/stuff/CVE-2022-3553.patch @ rev 25634

Mass update, new toolchain gcc 8.3.0, glibc 2.28.0
author Stanislas Leduc <shann@slitaz.org>
date Sun Jan 14 08:12:37 2024 +0000 (20 months ago)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xorg-server/stuff/CVE-2022-3553.patch	Sun Jan 14 08:12:37 2024 +0000
     1.3 @@ -0,0 +1,43 @@
     1.4 +From dfd057996b26420309c324ec844a5ba6dd07eda3 Mon Sep 17 00:00:00 2001
     1.5 +From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
     1.6 +Date: Sat, 2 Jul 2022 14:17:18 -0700
     1.7 +Subject: xquartz: Fix a possible crash when editing the Application menu due
     1.8 + to mutaing immutable arrays
     1.9 +
    1.10 +Crashing on exception: -[__NSCFArray replaceObjectAtIndex:withObject:]: mutating method sent to immutable object
    1.11 +
    1.12 +Application Specific Backtrace 0:
    1.13 +0   CoreFoundation                      0x00007ff80d2c5e9b __exceptionPreprocess + 242
    1.14 +1   libobjc.A.dylib                     0x00007ff80d027e48 objc_exception_throw + 48
    1.15 +2   CoreFoundation                      0x00007ff80d38167b _CFThrowFormattedException + 194
    1.16 +3   CoreFoundation                      0x00007ff80d382a25 -[__NSCFArray removeObjectAtIndex:].cold.1 + 0
    1.17 +4   CoreFoundation                      0x00007ff80d2e6c0b -[__NSCFArray replaceObjectAtIndex:withObject:] + 119
    1.18 +5   X11.bin                             0x00000001003180f9 -[X11Controller tableView:setObjectValue:forTableColumn:row:] + 169
    1.19 +
    1.20 +Fixes: https://github.com/XQuartz/XQuartz/issues/267
    1.21 +Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    1.22 +---
    1.23 + hw/xquartz/X11Controller.m | 7 +++++--
    1.24 + 1 file changed, 5 insertions(+), 2 deletions(-)
    1.25 +
    1.26 +diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
    1.27 +index 3b55bb6a5..e9a939312 100644
    1.28 +--- a/hw/xquartz/X11Controller.m
    1.29 ++++ b/hw/xquartz/X11Controller.m
    1.30 +@@ -469,8 +469,11 @@ extern char *bundle_id_prefix;
    1.31 +     self.table_apps = table_apps;
    1.32 + 
    1.33 +     NSArray * const apps = self.apps;
    1.34 +-    if (apps != nil)
    1.35 +-        [table_apps addObjectsFromArray:apps];
    1.36 ++    if (apps != nil) {
    1.37 ++        for (NSArray <NSString *> * row in apps) {
    1.38 ++            [table_apps addObject:row.mutableCopy];
    1.39 ++        }
    1.40 ++    }
    1.41 + 
    1.42 +     columns = [apps_table tableColumns];
    1.43 +     [[columns objectAtIndex:0] setIdentifier:@"0"];
    1.44 +-- 
    1.45 +cgit v1.2.1
    1.46 +