Hello, I have noticed that screen 4.7.0 crashes on my 11.x and 12.x FreeBSD systems whenever TERM was set to "rxvt" or "rxvt-unicode-256color".
Preliminary analysis in the bug report: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241538
Here's the rub: with TERM=xterm (or rxvt, for that matter), Km ("key_mouse", "Mouse event has occured") is not set (and therefore NULL), but InitTermcap() (termcap.c:230) happily tries to strdup() that, which gets us that segfault.
Looks like the culprit was: commit fad4c29fd95d30639a67142066f623396fca8536 Author: Amadeusz Sławiński <am...@asmblr.net> Date: Sat Sep 7 17:58:50 2019 +0200 Fix broken mouse after ncurses 6.1 ncurses 6.1 changed kmous capability from "\e[M" to "\e[<". It seems to be done to signal that terminal supports sgr mouse mode. screen assumed that if kmous is set to "\e[M" it is on xterm compatible terminal anyway, so just dynamically detect which one is used and override relevant kmapdef. InitKeytab() is moved, so kmapdef[] can be overriden before initialization, as InitTermcap() needs to run first, as far as I can tell this should have no consequences. Signed-off-by: Amadeusz Sławiński <am...@asmblr.net> A quick fix we have is to check for D_CKIM before strdup()ing it: https://bugs.freebsd.org/bugzilla/attachment.cgi?id=208653&action=diff saper
smime.p7s
Description: S/MIME Cryptographic Signature