HomeFreeBSD

sysutils/screen: fix coredump on xterm/rxvt variants without Km

Description

sysutils/screen: fix coredump on xterm/rxvt variants without Km

On xterm- and rxvt-variants (and in some other cases) screen's
InitTermcap() tries to strdup() the terminals "Km" ("key_mouse")
termcap attribute - but that might be NULL, as some of these
terminals (notably rxvt and xterm-color) do not have "Km". Trying
to strdup() NULL results in segfault and coredump.
Catch that NULL and prevent the segfault.

PR: 241538
Reported by: Marcin Cieślak, Gareth de Vaux
Approved by: cy@

Details

Provenance
cmtAuthored on
Parents
rP515867: devel/pecl-raphf2: Update version 2.0.0=>2.0.1
Branches
Unknown
Tags
Unknown