]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.4 - patch 20231121
authorThomas E. Dickey <dickey@invisible-island.net>
Wed, 22 Nov 2023 00:23:27 +0000 (00:23 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Wed, 22 Nov 2023 00:23:27 +0000 (00:23 +0000)
+ amend fix for Debian #1055882, correcting nul terminator check in
  waddnstr (Debian #1056340).

13 files changed:
NEWS
VERSION
dist.mk
ncurses/base/lib_addstr.c
ncurses/base/lib_insnstr.c
ncurses/widechar/lib_ins_wch.c
package/debian-mingw/changelog
package/debian-mingw64/changelog
package/debian/changelog
package/mingw-ncurses.nsi
package/mingw-ncurses.spec
package/ncurses.spec
package/ncursest.spec

diff --git a/NEWS b/NEWS
index c8c404117b3dc8d7f74b20b2d15eae4cae6ba35d..55b43488e729e3226ca7c32ff4f95e9be41811ad 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -26,7 +26,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.4033 2023/11/19 00:46:27 tom Exp $
+-- $Id: NEWS,v 1.4035 2023/11/21 21:51:04 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -46,6 +46,10 @@ See the AUTHORS file for the corresponding full names.
 Changes through 1.9.9e did not credit all contributions;
 it is not possible to add this information.
 
+20231121
+       + amend fix for Debian #1055882, correcting nul terminator check in
+         waddnstr (Debian #1056340).
+
 20231118
        + improve description of length-parameter and error-returns in several
          manpages:  curs_addchstr.3x, curs_addstr.3x, curs_addwstr.3x,
diff --git a/VERSION b/VERSION
index 5be4535cfa5ca6659fce73c507460afb114d8345..89dd3323447ba1e677bb5ff5a982bcab72baf66d 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.4     20231118
+5:0:10 6.4     20231121
diff --git a/dist.mk b/dist.mk
index d9f527679348750c0cb233da8d02f11bc14db75e..ee5177d67a13fb4040220ccf168876234c773320 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -26,7 +26,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.1577 2023/11/18 10:46:15 tom Exp $
+# $Id: dist.mk,v 1.1578 2023/11/21 21:44:33 tom Exp $
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
@@ -38,7 +38,7 @@ SHELL = /bin/sh
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 6
 NCURSES_MINOR = 4
-NCURSES_PATCH = 20231118
+NCURSES_PATCH = 20231121
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 43f329ca39831b05ef01d7f57c8958f82bcb5d3a..a3753af0d53e80cf90a3706abc4e3aecb7f7f725 100644 (file)
@@ -45,7 +45,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_addstr.c,v 1.61 2023/11/18 23:54:19 tom Exp $")
+MODULE_ID("$Id: lib_addstr.c,v 1.62 2023/11/21 21:47:23 tom Exp $")
 
 NCURSES_EXPORT(int)
 waddnstr(WINDOW *win, const char *astr, int n)
@@ -66,7 +66,7 @@ waddnstr(WINDOW *win, const char *astr, int n)
                           (explicit ? n : (int) strlen(str))));
        if (!explicit)
            n = INT_MAX;
-       while ((explicit || (*str != '\0')) && (n-- > 0)) {
+       while ((n-- > 0) && (*str != '\0')) {
            NCURSES_CH_T ch;
            TR(TRACE_VIRTPUT, ("*str = %#o", UChar(*str)));
            SetChar(ch, UChar(*str++), A_NORMAL);
@@ -241,7 +241,7 @@ waddnwstr(WINDOW *win, const wchar_t *str, int n)
                           (explicit ? n : (int) wcslen(str))));
        if (!explicit)
            n = INT_MAX;
-       while ((explicit || (*str != L('\0'))) && (n-- > 0)) {
+       while ((n-- > 0) && (*str != L('\0'))) {
            NCURSES_CH_T ch;
            TR(TRACE_VIRTPUT, ("*str[0] = %#lx", (unsigned long) *str));
            SetChar(ch, *str++, A_NORMAL);
index 338a96b322ff1d1063b0a4f94a94ab9be7ac9f97..caec48e8eb700825e2c61f3e569a075e28af5fa8 100644 (file)
@@ -41,7 +41,7 @@
 #include <curses.priv.h>
 #include <ctype.h>
 
-MODULE_ID("$Id: lib_insnstr.c,v 1.9 2023/11/18 23:47:19 tom Exp $")
+MODULE_ID("$Id: lib_insnstr.c,v 1.10 2023/11/21 21:58:03 tom Exp $")
 
 NCURSES_EXPORT(int)
 winsnstr(WINDOW *win, const char *s, int n)
@@ -62,7 +62,7 @@ winsnstr(WINDOW *win, const char *s, int n)
         * call to the wins_nwstr() function.
         */
        if (sp->_screen_unicode) {
-           size_t nn = (n >= 0) ? (size_t) n : strlen(s);
+           size_t nn = (n > 0) ? (size_t) n : strlen(s);
            wchar_t *buffer = typeMalloc(wchar_t, nn + 1);
            if (buffer != 0) {
                mbstate_t state;
index 1be3b0eeb618870a73ee3d4f02da79394939bfd0..ecaabcc9b73e3bd8ab037d4b8686db5b317dba47 100644 (file)
@@ -40,7 +40,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_ins_wch.c,v 1.27 2023/11/18 23:48:20 tom Exp $")
+MODULE_ID("$Id: lib_ins_wch.c,v 1.29 2023/11/21 21:53:28 tom Exp $")
 
 /*
  * Insert the given character, updating the current location to simplify
@@ -111,10 +111,8 @@ wins_nwstr(WINDOW *win, const wchar_t *wstr, int n)
     if (win != 0
        && wstr != 0
        && n != 0) {
-       bool explicit = TRUE;
 
        if (n < 0) {
-           explicit = FALSE;
            n = INT_MAX;
        }
        code = OK;
@@ -125,7 +123,7 @@ wins_nwstr(WINDOW *win, const wchar_t *wstr, int n)
            NCURSES_SIZE_T oy = win->_cury;
            NCURSES_SIZE_T ox = win->_curx;
 
-           for (cp = wstr; (explicit || (*cp != L'\0')) && ((cp - wstr) < n); cp++) {
+           for (cp = wstr; ((cp - wstr) < n) && (*cp != L'\0'); cp++) {
                int len = _nc_wacs_width(*cp);
 
                if ((len >= 0 && len != 1) || !is7bits(*cp)) {
index 079d4e9e9ab7a70b5c37b7e78672d57e8efd2ee7..156469e4a7b851ad7f1db7c28a9df1acd8340684 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.4+20231118) unstable; urgency=low
+ncurses6 (6.4+20231121) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 13 Nov 2023 20:05:39 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Tue, 21 Nov 2023 16:44:33 -0500
 
 ncurses6 (5.9+20131005) unstable; urgency=low
 
index 079d4e9e9ab7a70b5c37b7e78672d57e8efd2ee7..156469e4a7b851ad7f1db7c28a9df1acd8340684 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.4+20231118) unstable; urgency=low
+ncurses6 (6.4+20231121) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 13 Nov 2023 20:05:39 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Tue, 21 Nov 2023 16:44:33 -0500
 
 ncurses6 (5.9+20131005) unstable; urgency=low
 
index edc71475e1cde038b4116976668713c2c8ffdc13..4c6170b3bfd2012498cb6fcaa7bee21f448b7f3c 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.4+20231118) unstable; urgency=low
+ncurses6 (6.4+20231121) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 13 Nov 2023 20:05:39 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Tue, 21 Nov 2023 16:44:33 -0500
 
 ncurses6 (5.9+20120608) unstable; urgency=low
 
index 9a69bf93a019f08415bcff23706244be549ffd1b..0ea10d0117d737f66babdca329d291c973350272 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.617 2023/11/14 01:05:39 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.618 2023/11/21 21:44:33 tom Exp $\r
 \r
 ; TODO add examples\r
 ; TODO bump ABI to 6\r
@@ -10,7 +10,7 @@
 !define VERSION_MAJOR "6"\r
 !define VERSION_MINOR "4"\r
 !define VERSION_YYYY  "2023"\r
-!define VERSION_MMDD  "1118"\r
+!define VERSION_MMDD  "1121"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index 6865b071037afa583adba564638fbd22a379b85b..1b4b84314bff6b4ba93657a0c52007297dfa50df 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.4
-Release: 20231118
+Release: 20231121
 License: X11
 Group: Development/Libraries
 URL: https://invisible-island.net/ncurses/
index 6c79b367546e536f8d2bd7f2bfcfa2488afd0aa2..efc5072c4c4b4222c5c8b2a77224e9a7dc370a79 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.4
-Release: 20231118
+Release: 20231121
 License: X11
 Group: Development/Libraries
 URL: https://invisible-island.net/ncurses/
index e6d27a12d3532b260175c76f36dbdae7286afef5..8a16ae6598ab31804a318b394da90eb11423a2a0 100644 (file)
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.4
-Release: 20231118
+Release: 20231121
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz