From: Gerd Möllmann Date: Sun, 18 Sep 2022 05:44:23 +0000 (+0200) Subject: Fix possible null pointer access X-Git-Tag: emacs-29.0.90~1856^2~407 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=117795a0594d1b4fc1c267311d789b0255ac6291;p=emacs.git Fix possible null pointer access * src/term.c (Ftty__output_buffer_size): Handle case of decode_tty_terminal returning NULL. --- diff --git a/src/term.c b/src/term.c index 231324d002a..f8104e0304e 100644 --- a/src/term.c +++ b/src/term.c @@ -2433,7 +2433,9 @@ A value of zero means TTY uses the system's default value. */) (Lisp_Object tty) { struct terminal *terminal = decode_tty_terminal (tty); - return make_fixnum (terminal->display_info.tty->output_buffer_size); + if (terminal) + return make_fixnum (terminal->display_info.tty->output_buffer_size); + error ("Not a tty terminal"); }