1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-23 21:45:30 +00:00
profanity/src/ui
Michael Vetter 62e98dee74 Fix crash when using NetBSD curses implementation
Thanks to @alarixnia fot the patch and bugreport.

```
Forwarding a bug reported using the NetBSD bug tracker ("Profanity crashes at login"): http://gnats.netbsd.org/57050

The code in question here handles messages by people not in the user's contact list, and what is probably happening is that the XMPP server is sending such a message before profanity has set up its window layout.

Setting roster.unsubscribed=false indeed makes profanity start without crashing, and the attached patch bails out early in the problematic code path if layout->subwin is NULL (Adrian verified for me that either of the two makes profanity work for him again). But I am not familiar enough with the profanity code to say if this has any issues.

Profanity compiled with ncurses doesn't crash because ncurses's wattron() has a guard against the user passing null pointers, but the X/Open curses library standard doesn't have this guarantee and there's no guard in the NetBSD curses implementation.
```

Fix https://github.com/profanity-im/profanity/issues/1769
2023-07-12 13:58:03 +02:00
..
buffer.c Update copyright year 2023-01-10 10:37:25 +01:00
buffer.h Update copyright year 2023-01-10 10:37:25 +01:00
chatwin.c Change char->free to auto_char char for autocleanup 2023-07-11 13:26:37 +02:00
confwin.c Cleanup: gchar as gchar instead of char 2023-05-04 16:15:09 +02:00
console.c Change char->free to auto_char char for autocleanup 2023-07-11 13:26:37 +02:00
core.c Change char->free to auto_char char for autocleanup 2023-07-11 13:26:37 +02:00
inputwin.c Change char->free to auto_char char for autocleanup 2023-07-11 13:26:37 +02:00
inputwin.h Add vim modeline 2019-11-13 12:11:05 +01:00
mucwin.c Change char->free to auto_char char for autocleanup 2023-07-11 13:26:37 +02:00
notifier.c Change char->free to auto_char char for autocleanup 2023-07-11 13:26:37 +02:00
occupantswin.c Change char->free to auto_char char for autocleanup 2023-07-11 13:26:37 +02:00
privwin.c Adapt to g_string_free glib 2.75.3 change 2023-03-21 10:53:10 +01:00
rosterwin.c Fix crash when using NetBSD curses implementation 2023-07-12 13:58:03 +02:00
screen.c Basic support for building on NetBSD. 2020-09-04 12:55:20 +02:00
screen.h Add vim modeline 2019-11-13 12:11:05 +01:00
statusbar.c Change char->free to auto_char char for autocleanup 2023-07-11 13:26:37 +02:00
statusbar.h Apply coding style 2020-07-07 14:18:57 +02:00
titlebar.c Change char->free to auto_char char for autocleanup 2023-07-11 13:26:37 +02:00
titlebar.h Add vim modeline 2019-11-13 12:11:05 +01:00
tray.c Apply coding style 2020-07-07 14:18:57 +02:00
tray.h Add vim modeline 2019-11-13 12:11:05 +01:00
ui.h Improve const-correctness of API 2023-05-12 08:39:19 +02:00
vcardwin.c Change char->free to auto_char char for autocleanup 2023-07-11 13:26:37 +02:00
win_types.h Add vCard support 2022-10-18 23:24:30 +01:00
window_list.c Change char->free to auto_char char for autocleanup 2023-07-11 13:26:37 +02:00
window_list.h Fix quote and url autocompletion for MAM and history 2023-02-13 23:40:58 +02:00
window.c Change char->free to auto_char char for autocleanup 2023-07-11 13:26:37 +02:00
window.h Fix duplicate download IDs. 2023-03-09 15:02:26 -07:00
xmlwin.c Add config.h in files were it was missing 2021-03-26 19:54:22 +01:00