Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15317

Bash-5.0 Official patch 8

Path csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Bash-5.0 Official patch 8
Date Wed, 14 Aug 2019 15:28:17 -0400
Lines 74
Sender chet <chet@caleb.ins.cwru.edu>
Approved bug-bash@gnu.org
Message-ID <mailman.31.1565811400.30381.bug-bash@gnu.org> (permalink)
References <190814192817.AA39361.SM@caleb.ins.cwru.edu>
Reply-To chet.ramey@case.edu
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace usenet.stanford.edu 1565811401 27398 209.51.188.17 (14 Aug 2019 19:36:41 GMT)
X-Complaints-To action@cs.stanford.edu
Cc chet.ramey@case.edu
To bug-bash@gnu.org
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=case.edu; s=smtp-primary; t=1565811396; bh=+fv+9jWY9L8JGLb5t28K80t52RhwVIupizmJY2fH4L0=; h=Date:From:Sender:To:Subject:Cc:Reply-To:Message-ID:MIME-Version: Content-Type; b=sac5soCGzSPbs2sOg8bNqR93preWdluC6zbRWv1iNkCOK0FhtNG5ynVc4B378BJakW ERknRD7LcElKCZwx3QYsjtgrT4B+hUMEyYi9ZSmdPFYG2R1K39IV3ddPAkQfTntmdH4 UTlFz9WhvA2nfkuWqiknHXNEEblA3onsVZ942O5U7zW1yRAi/dcTd1L9EHqJAC8WgXm IOVlQ8ts1gv2H7hIttOM+sC/Dyx2lvM6N8IK+UAO5sujIKyY1P1/dpArySoEykEIxiD tzzQV+s+IlA8aG1N89V0mTr3f9u8vK79MHBv+oxltyYdaUj9IlPF0vdRWkh1X7PnAxt VJouW87w==
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=case.edu; s=smtp-primary; t=1565811033; bh=5M4AMbUiB4lIWMvFiWkjWCjJTM4rtKHJAPmDeOGhofU=; h=Date:From:Sender:To:Subject:Cc:Reply-To:Message-ID:MIME-Version: Content-Type; b=R7i5hBa7EMWtYGCubmNvPMFYuhkqvaa1eYaFukNJUL7IhyUNTqKv4IQexVytxeX6m+ NE2RM3OecchP5Tnh3mKDFsodKVdtSlobgTXEZwufPLfGQNK5bUbnfaMHbAiYqQ6o0OR uvla62PFqTQjkZeM0pvQ8wIhWc66lmWY75tmXVnohGga2hNzgxBpO+ITHX4r16ZExYq PzleJyMYx7z+16tzRYVjif9saTlqweCCYqx/DtGaTRsfb8hQRxM5Z5X0XTlJ4rFhFhQ FE1L2XhSKIC49ZHIQDfgalXlbu1n3u3mq0fvBnrYqQ7SiZiUPuMgyiHW1aFSzN+ysHW Af16HWQQ==
Read-Receipt-To chet.ramey@case.edu
X-Junkmail-Status score=7/90, host=mpv3-2015.case.edu
X-Junkmail-PrAS-Raw score=7/90, refid=2.7.2:2019.8.14.184217:17:7.944, ip=, rules=DKIM_SIGNATURE, DATE_TZ_NA, __HAS_FROM, FROM_EDU_TLD, __TO_MALFORMED_2, __TO_NO_NAME, __HAS_CC_HDR, __HAS_REPLYTO, __HAS_MSGID, __SANE_MSGID, __MIME_VERSION, __CT, __CT_TEXT_PLAIN, __REPLYTO_SAMEAS_FROM_ADDY, __REPLYTO_SAMEAS_FROM_ACC, __FROM_DOMAIN_IN_ANY_CC1, __REPLYTO_SAMEAS_FROM_DOMAIN, __DKIM_ALIGNS_1, __DKIM_ALIGNS_2, __ANY_URI, __HTTPS_URI, __URI_WITH_PATH, URI_ENDS_IN_HTML, __FRAUD_BODY_WEBMAIL, __URI_NO_WWW, __PHISH_PHRASE3, __STOCK_PHRASE_24, __CP_URI_IN_BODY, __SUBJ_ALPHA_NEGATE, __MULTIPLE_URI_TEXT, __URI_IN_BODY, __URI_NOT_IMG, __BODY_NO_MAILTO, __NO_HTML_TAG_RAW, BODYTEXTP_SIZE_3000_LESS, BODY_SIZE_2000_2999, __MIME_TEXT_P1, __MIME_TEXT_ONLY, __URI_NS, HTML_00_01, HTML_00_10, DKIM_ALIGNS, BODY_SIZE_5000_LESS, __FRAUD_WEBMAIL, __FROM_DOMAIN_IN_RCPT, MULTIPLE_REAL_RCPTS, LEGITIMATE_SIGNS, __MIME_TEXT_P, __PHISH_SPEAR_STRUCTURE_1, [TRUNCATED], so=2010-03-03 19:42:08, dmn=2016-08-03-0138
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From 129.22.103.194
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <190814192817.AA39361.SM@caleb.ins.cwru.edu>
Xref csiph.com gnu.bash.bug:15317

Show key headers only | View raw


			     BASH PATCH REPORT
			     =================

Bash-Release:	5.0
Patch-ID:	bash50-008

Bug-Reported-by:	Michael Albinus <michael.albinus@gmx.de>
Bug-Reference-ID:	<87bm36k3kz.fsf@gmx.de>
Bug-Reference-URL:	https://lists.gnu.org/archive/html/bug-bash/2019-02/msg00111.html

Bug-Description:

When HISTSIZE is set to 0, history expansion can leave the history length
set to an incorrect value, leading to subsequent attempts to access invalid
memory.

Patch (apply with `patch -p0'):

*** ../bash-5.0-patched/bashhist.c	2018-07-05 22:41:14.000000000 -0400
--- bashhist.c	2019-02-20 16:20:04.000000000 -0500
***************
*** 561,573 ****
    if (!history_expansion_inhibited && history_expansion && history_expansion_p (line))
      {
        /* If we are expanding the second or later line of a multi-line
  	 command, decrease history_length so references to history expansions
  	 in these lines refer to the previous history entry and not the
  	 current command. */
        if (history_length > 0 && command_oriented_history && current_command_first_line_saved && current_command_line_count > 1)
          history_length--;
        expanded = history_expand (line, &history_value);
        if (history_length >= 0 && command_oriented_history && current_command_first_line_saved && current_command_line_count > 1)
!         history_length++;
  
        if (expanded)
--- 561,576 ----
    if (!history_expansion_inhibited && history_expansion && history_expansion_p (line))
      {
+       int old_len;
+ 
        /* If we are expanding the second or later line of a multi-line
  	 command, decrease history_length so references to history expansions
  	 in these lines refer to the previous history entry and not the
  	 current command. */
+       old_len = history_length;
        if (history_length > 0 && command_oriented_history && current_command_first_line_saved && current_command_line_count > 1)
          history_length--;
        expanded = history_expand (line, &history_value);
        if (history_length >= 0 && command_oriented_history && current_command_first_line_saved && current_command_line_count > 1)
!         history_length = old_len;
  
        if (expanded)

*** ../bash-5.0/patchlevel.h	2016-06-22 14:51:03.000000000 -0400
--- patchlevel.h	2016-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 7
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 8
  
  #endif /* _PATCHLEVEL_H_ */

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Bash-5.0 Official patch 8 Chet Ramey <chet.ramey@case.edu> - 2019-08-14 15:28 -0400

csiph-web