git: b2da1032397e - main - ncurses: Apply a tputs() fix from patch 20210403

Mark Johnston markj at FreeBSD.org
Wed Aug 11 17:10:20 UTC 2021


The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=b2da1032397e3339fbeebcd57b1f179e1d8a2e19

commit b2da1032397e3339fbeebcd57b1f179e1d8a2e19
Author:     Mark Johnston <markj at FreeBSD.org>
AuthorDate: 2021-08-11 16:54:29 +0000
Commit:     Mark Johnston <markj at FreeBSD.org>
CommitDate: 2021-08-11 17:08:23 +0000

    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 3eb19d2d9662..4b89a19ed9dd 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 <termcap.h>		/* ospeed */
 #include <tic.h>
 
-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);


More information about the dev-commits-src-main mailing list