From b2da1032397e3339fbeebcd57b1f179e1d8a2e19 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Wed, 11 Aug 2021 12:54:29 -0400 Subject: [PATCH] ncurses: Apply a tputs() fix from patch 20210403 From the (substantially larger) upstream commit: + call delay_output_sp to handle BSD-style padding when tputs_sp is called, whether directly or internally, to ensure that the SCREEN pointer is passed correctly (reports by Henric Jungheim, Juraj Lutter). This fixes bison segfaults observed when colourized output is enabled. Thanks to jrtc27@ for identifying the upstream fix. PR: 256731 MFC after: 3 days --- contrib/ncurses/ncurses/tinfo/lib_tputs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/ncurses/ncurses/tinfo/lib_tputs.c b/contrib/ncurses/ncurses/tinfo/lib_tputs.c index 3eb19d2d966..4b89a19ed9d 100644 --- a/contrib/ncurses/ncurses/tinfo/lib_tputs.c +++ b/contrib/ncurses/ncurses/tinfo/lib_tputs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2020,2021 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -52,7 +52,7 @@ #include /* ospeed */ #include -MODULE_ID("$Id: lib_tputs.c,v 1.106 2020/11/29 00:40:08 tom Exp $") +MODULE_ID("$Id: lib_tputs.c,v 1.107 2021/04/03 18:45:53 tom Exp $") NCURSES_EXPORT_VAR(char) PC = 0; /* used by termcap library */ NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0; /* used by termcap library */ @@ -429,7 +429,7 @@ NCURSES_SP_NAME(tputs) (NCURSES_SP_DCLx */ if (trailpad > 0 && (always_delay || normal_delay)) - delay_output(trailpad / 10); + NCURSES_SP_NAME(delay_output) (NCURSES_SP_ARGx trailpad / 10); #endif /* BSD_TPUTS */ SetOutCh(my_outch);