Module Name: src Committed By: martin Date: Sat Jul 20 15:43:23 UTC 2024
Modified Files: src/bin/sh [netbsd-9]: histedit.c Log Message: Pull up following revision(s) (requested by kre in ticket #1856): bin/sh/histedit.c: revision 1.68 Ignore non-numeric values for HISTSIZE This is a temporary change (which can be pulled up to -9 and -10) to avoid having HISTSIZE=foo /bin/sh cause sh to fail to start. A better change, but one requiring far more code changes, so that bad HISTSIZE is ignored, only when read from the environment, but will be an error otherwise, will come later. To generate a diff of this commit: cvs rdiff -u -r1.55.2.1 -r1.55.2.2 src/bin/sh/histedit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/bin/sh/histedit.c diff -u src/bin/sh/histedit.c:1.55.2.1 src/bin/sh/histedit.c:1.55.2.2 --- src/bin/sh/histedit.c:1.55.2.1 Mon Feb 21 17:58:11 2022 +++ src/bin/sh/histedit.c Sat Jul 20 15:43:23 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: histedit.c,v 1.55.2.1 2022/02/21 17:58:11 martin Exp $ */ +/* $NetBSD: histedit.c,v 1.55.2.2 2024/07/20 15:43:23 martin Exp $ */ /*- * Copyright (c) 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)histedit.c 8.2 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: histedit.c,v 1.55.2.1 2022/02/21 17:58:11 martin Exp $"); +__RCSID("$NetBSD: histedit.c,v 1.55.2.2 2024/07/20 15:43:23 martin Exp $"); #endif #endif /* not lint */ @@ -215,7 +215,7 @@ sethistsize(const char *hs) HistEvent he; if (hist != NULL) { - if (hs == NULL || *hs == '\0' || *hs == '-' || + if (hs == NULL || *hs == '\0' || !is_number(hs) || (histsize = number(hs)) < 0) histsize = 100; INTOFF;