pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/shells/bash shells/bash: fix array subscript with char
details: https://anonhg.NetBSD.org/pkgsrc/rev/68dda7277c69
branches: trunk
changeset: 425000:68dda7277c69
user: rillig <rillig%pkgsrc.org@localhost>
date: Tue Mar 17 17:09:48 2020 +0000
description:
shells/bash: fix array subscript with char
diffstat:
shells/bash/distinfo | 5 ++++-
shells/bash/patches/patch-bashline.c | 15 +++++++++++++++
shells/bash/patches/patch-lib_malloc_malloc.c | 15 +++++++++++++++
shells/bash/patches/patch-subst.c | 15 +++++++++++++++
4 files changed, 49 insertions(+), 1 deletions(-)
diffs (80 lines):
diff -r dc0a5b209484 -r 68dda7277c69 shells/bash/distinfo
--- a/shells/bash/distinfo Tue Mar 17 16:02:23 2020 +0000
+++ b/shells/bash/distinfo Tue Mar 17 17:09:48 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.57 2020/02/11 11:45:25 kre Exp $
+$NetBSD: distinfo,v 1.58 2020/03/17 17:09:48 rillig Exp $
SHA1 (bash-5.0.tar.gz) = d116b469b9e6ea5264a74661d3a4c797da7f997b
RMD160 (bash-5.0.tar.gz) = a081428a896d617855499376b670eca3433a27c1
@@ -71,10 +71,13 @@
SHA1 (patch-af) = e26e3209902247263884cfebc11a2f7e43245062
SHA1 (patch-ag) = cd3b151e3bb045d2bb609c0a03d7d3df2c871f47
SHA1 (patch-aj) = 2e4c15afd9b50d44967ee8e1f85bdc908c0eeeb0
+SHA1 (patch-bashline.c) = 812de2510f3eca741bfee38bad14bcaa8091681e
SHA1 (patch-builtins_ulimit.def) = 1390069344607204eb3abbd6ddeb148ff590c55e
SHA1 (patch-configure) = c4e1ab53a1ee85f3e6121047f0aca8ceb85e6e5d
SHA1 (patch-examples_loadables_fdflags.c) = 92a63c8f4c94ccf9cf782e934a0806930d172654
SHA1 (patch-examples_loadables_push.c) = 57a3c7de9ea0a75c373db678d9500954bcf40ff4
+SHA1 (patch-lib_malloc_malloc.c) = 83e93dfa6b65de77878425f8dff51ecb53085323
SHA1 (patch-shell.c) = daa07914d4c318cd72463f80344f4f7c364809cd
+SHA1 (patch-subst.c) = b0dccd5dc96c19eba1dd160e4def0f9291ce06e1
SHA1 (patch-support_shobj-conf) = 8750c104549ea8a4a722bd21a684a9fe13e05fe5
SHA1 (patch-variables.c) = 8d91272602aba348dc158d8fb5948edd90d96646
diff -r dc0a5b209484 -r 68dda7277c69 shells/bash/patches/patch-bashline.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/shells/bash/patches/patch-bashline.c Tue Mar 17 17:09:48 2020 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-bashline.c,v 1.1 2020/03/17 17:09:48 rillig Exp $
+
+Fix array subscript with char index.
+
+--- bashline.c.orig 2020-03-17 16:57:19.058552795 +0000
++++ bashline.c
+@@ -4050,7 +4050,7 @@ set_filename_bstab (string)
+
+ memset (filename_bstab, 0, sizeof (filename_bstab));
+ for (s = string; s && *s; s++)
+- filename_bstab[*s] = 1;
++ filename_bstab[(unsigned char) *s] = 1;
+ }
+
+ /* Quote a filename using double quotes, single quotes, or backslashes
diff -r dc0a5b209484 -r 68dda7277c69 shells/bash/patches/patch-lib_malloc_malloc.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/shells/bash/patches/patch-lib_malloc_malloc.c Tue Mar 17 17:09:48 2020 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-lib_malloc_malloc.c,v 1.1 2020/03/17 17:09:48 rillig Exp $
+
+Fix array subscript with char index.
+
+--- lib/malloc/malloc.c.orig 2018-06-20 13:55:09.000000000 +0000
++++ lib/malloc/malloc.c
+@@ -266,7 +266,7 @@ static const unsigned long binsizes[NBUC
+ };
+
+ /* binsizes[x] == (1 << ((x) + 3)) */
+-#define binsize(x) binsizes[(x)]
++#define binsize(x) binsizes[(size_t) (x)]
+
+ #if !defined (errno)
+ extern int errno;
diff -r dc0a5b209484 -r 68dda7277c69 shells/bash/patches/patch-subst.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/shells/bash/patches/patch-subst.c Tue Mar 17 17:09:48 2020 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-subst.c,v 1.1 2020/03/17 17:09:48 rillig Exp $
+
+Fix array subscript with char index.
+
+--- subst.c.orig 2020-03-17 16:57:17.469764555 +0000
++++ subst.c
+@@ -11294,7 +11294,7 @@ shell_expand_word_list (tlist, eflags)
+ case 'l':
+ case 'u':
+ case 'c':
+- omap[l->word->word[oind]] = 1;
++ omap[(unsigned char) l->word->word[oind]] = 1;
+ if (opti == 0)
+ opts[opti++] = '-';
+ break;
Home |
Main Index |
Thread Index |
Old Index