wok-current view 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 source
1 From dfd057996b26420309c324ec844a5ba6dd07eda3 Mon Sep 17 00:00:00 2001
2 From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
3 Date: Sat, 2 Jul 2022 14:17:18 -0700
4 Subject: xquartz: Fix a possible crash when editing the Application menu due
5 to mutaing immutable arrays
7 Crashing on exception: -[__NSCFArray replaceObjectAtIndex:withObject:]: mutating method sent to immutable object
9 Application Specific Backtrace 0:
10 0 CoreFoundation 0x00007ff80d2c5e9b __exceptionPreprocess + 242
11 1 libobjc.A.dylib 0x00007ff80d027e48 objc_exception_throw + 48
12 2 CoreFoundation 0x00007ff80d38167b _CFThrowFormattedException + 194
13 3 CoreFoundation 0x00007ff80d382a25 -[__NSCFArray removeObjectAtIndex:].cold.1 + 0
14 4 CoreFoundation 0x00007ff80d2e6c0b -[__NSCFArray replaceObjectAtIndex:withObject:] + 119
15 5 X11.bin 0x00000001003180f9 -[X11Controller tableView:setObjectValue:forTableColumn:row:] + 169
17 Fixes: https://github.com/XQuartz/XQuartz/issues/267
18 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
19 ---
20 hw/xquartz/X11Controller.m | 7 +++++--
21 1 file changed, 5 insertions(+), 2 deletions(-)
23 diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
24 index 3b55bb6a5..e9a939312 100644
25 --- a/hw/xquartz/X11Controller.m
26 +++ b/hw/xquartz/X11Controller.m
27 @@ -469,8 +469,11 @@ extern char *bundle_id_prefix;
28 self.table_apps = table_apps;
30 NSArray * const apps = self.apps;
31 - if (apps != nil)
32 - [table_apps addObjectsFromArray:apps];
33 + if (apps != nil) {
34 + for (NSArray <NSString *> * row in apps) {
35 + [table_apps addObject:row.mutableCopy];
36 + }
37 + }
39 columns = [apps_table tableColumns];
40 [[columns objectAtIndex:0] setIdentifier:@"0"];
41 --
42 cgit v1.2.1