upg bash btrfs-progs
This commit is contained in:
parent
8f461d53d7
commit
349561353d
7 changed files with 0 additions and 293 deletions
|
@ -1,37 +0,0 @@
|
|||
https://lists.gnu.org/archive/html/bug-bash/2023-02/msg00000.html)
|
||||
|
||||
From 2cdf8b42885189b3cf7c47096b01f104e520546a Mon Sep 17 00:00:00 2001
|
||||
From: Sam James <sam@gentoo.org>
|
||||
Date: Thu, 2 Feb 2023 05:43:37 +0000
|
||||
Subject: [PATCH] aclocal.m4: fix -Wimplicit-function-declaration in dup2 check
|
||||
|
||||
dup2 requires a <unistd.h> include. Fixes the following when diffing config.log
|
||||
when testing with a stricter compiler:
|
||||
```
|
||||
-warning: call to undeclared function 'dup2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
|
||||
+error: call to undeclared function 'dup2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
|
||||
```
|
||||
--- aclocal.m4
|
||||
+++ aclocal.m4
|
||||
@@ -238,6 +238,9 @@ AC_CACHE_VAL(bash_cv_dup2_broken,
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
+#ifdef HAVE_UNISTD_H
|
||||
+#include <unistd.h>
|
||||
+#endif
|
||||
int
|
||||
main()
|
||||
{
|
||||
--- configure
|
||||
+++ configure
|
||||
@@ -18121,6 +18121,9 @@ else $as_nop
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
+#ifdef HAVE_UNISTD_H
|
||||
+#include <unistd.h>
|
||||
+#endif
|
||||
int
|
||||
main()
|
||||
{
|
|
@ -1,13 +0,0 @@
|
|||
https://lists.gnu.org/archive/html/bug-bash/2023-01/msg00016.html
|
||||
https://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=0647e53bd15c8982d89a03c2db1643aedd7cd649
|
||||
|
||||
--- lib/sh/random.c
|
||||
+++ lib/sh/random.c
|
||||
@@ -75,7 +75,7 @@ u_bits32_t last;
|
||||
/* Can't seed with 0. */
|
||||
ret = (last == 0) ? 123459876 : last;
|
||||
h = ret / 127773;
|
||||
- l = ret - (127773 * h);
|
||||
+ l = ret % 127773;
|
||||
t = 16807 * l - 2836 * h;
|
||||
ret = (t < 0) ? t + 0x7fffffff : t;
|
|
@ -1,32 +0,0 @@
|
|||
https://src.fedoraproject.org/rpms/bash/blob/bd5ac20b134f2936c54245fc83a8e70207d3e07e/f/bash-configure-c99-2.patch
|
||||
|
||||
Another C compatibility issue: char ** and char * are distinct types,
|
||||
and strtold expects the former for its second argument.
|
||||
|
||||
Submitted upstream:
|
||||
|
||||
<https://lists.gnu.org/archive/html/bug-bash/2023-11/msg00104.html>
|
||||
|
||||
--- configure.ac
|
||||
+++ configure.ac
|
||||
@@ -885,7 +885,7 @@ AC_CHECK_DECLS([strtold], [
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <stdlib.h>]],
|
||||
- [[long double r; char *foo, bar; r = strtold(foo, &bar);]]
|
||||
+ [[long double r; char *foo, *bar; r = strtold(foo, &bar);]]
|
||||
)],
|
||||
[bash_cv_strtold_broken=no],[bash_cv_strtold_broken=yes])
|
||||
]
|
||||
|
||||
--- configure
|
||||
+++ configure
|
||||
@@ -15676,7 +15676,7 @@ else $as_nop
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
-long double r; char *foo, bar; r = strtold(foo, &bar);
|
||||
+long double r; char *foo, *bar; r = strtold(foo, &bar);
|
||||
|
||||
;
|
||||
return 0;
|
|
@ -1,13 +0,0 @@
|
|||
https://lists.gnu.org/archive/html/bug-bash/2023-03/msg00116.html
|
||||
https://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=57d4dc15ff35895a1c1248f948f59739ffb99fde
|
||||
--- lib/sh/random.c
|
||||
+++ lib/sh/random.c
|
||||
@@ -90,7 +90,7 @@ genseed ()
|
||||
u_bits32_t iv;
|
||||
|
||||
gettimeofday (&tv, NULL);
|
||||
- iv = (u_bits32_t)seedrand; /* let the compiler truncate */
|
||||
+ iv = (uintptr_t)seedrand; /* let the compiler truncate */
|
||||
iv = tv.tv_sec ^ tv.tv_usec ^ getpid () ^ getppid () ^ current_user.uid ^ iv;
|
||||
return (iv);
|
||||
}
|
|
@ -1,136 +0,0 @@
|
|||
https://lists.gnu.org/archive/html/bug-bash/2024-01/msg00036.html
|
||||
https://lists.gnu.org/archive/html/bug-bash/2024-01/txtm8yNNPR9RQ.txt
|
||||
|
||||
For evalstring.c:
|
||||
* https://lists.gnu.org/archive/html/bug-bash/2024-01/msg00011.html
|
||||
* https://git.savannah.gnu.org/cgit/bash.git/diff/builtins/evalstring.c?h=devel&id=81f7b44564cd1510788035cea7c59631865a7db2&dt=1#n766
|
||||
|
||||
From 711ab85262884f2b91f09eceb9aefd0e2426ce67 Mon Sep 17 00:00:00 2001
|
||||
From: Grisha Levit <grishalevit@gmail.com>
|
||||
Date: Sat, 3 Jun 2023 16:51:26 -0400
|
||||
Subject: [PATCH] various leaks
|
||||
|
||||
Found mostly by normal usage running a no-bash-malloc build with clang's
|
||||
LeakSanitizer enabled. So far seems to provide very accurate results.
|
||||
|
||||
* arrayfunc.c
|
||||
- quote_compound_array_word: make sure to free VALUE
|
||||
- bind_assoc_var_internal: if assigning to a dynamic variable, make sure
|
||||
to free the key (usually assoc_insert would do it)
|
||||
|
||||
* bashline.c
|
||||
- bash_command_name_stat_hook: free original *NAME if we are going to
|
||||
change what it points to (what the callers seem to expect)
|
||||
|
||||
* builtins/evalstring.c
|
||||
- parse_and_execute: make sure to dispose of the parsed command
|
||||
resulting from a failed function import attempt
|
||||
- open_redir_file: if we did not get a pointer to pass back the expanded
|
||||
filename, make sure to free the name
|
||||
|
||||
* examples/loadables/stat.c
|
||||
- loadstat: bind_assoc_variable does not free its VALUE argument so make
|
||||
sure to do it
|
||||
|
||||
* subst.c
|
||||
- param_expand: free temp1 value for codepaths that don't do it
|
||||
---
|
||||
arrayfunc.c | 6 +++++-
|
||||
bashline.c | 1 +
|
||||
builtins/evalstring.c | 4 ++++
|
||||
examples/loadables/stat.c | 1 +
|
||||
subst.c | 2 ++
|
||||
5 files changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arrayfunc.c b/arrayfunc.c
|
||||
index 2c05d15b..8ba64084 100644
|
||||
--- arrayfunc.c
|
||||
+++ arrayfunc.c
|
||||
@@ -208,7 +208,10 @@ bind_assoc_var_internal (entry, hash, key, value, flags)
|
||||
newval = make_array_variable_value (entry, 0, key, value, flags);
|
||||
|
||||
if (entry->assign_func)
|
||||
- (*entry->assign_func) (entry, newval, 0, key);
|
||||
+ {
|
||||
+ (*entry->assign_func) (entry, newval, 0, key);
|
||||
+ FREE (key);
|
||||
+ }
|
||||
else
|
||||
assoc_insert (hash, key, newval);
|
||||
|
||||
@@ -985,6 +988,7 @@ quote_compound_array_word (w, type)
|
||||
if (t != w+ind)
|
||||
free (t);
|
||||
strcpy (nword + i, value);
|
||||
+ free (value);
|
||||
|
||||
return nword;
|
||||
}
|
||||
diff --git a/bashline.c b/bashline.c
|
||||
index c85b05b6..bd7548cc 100644
|
||||
--- bashline.c
|
||||
+++ bashline.c
|
||||
@@ -1928,6 +1928,7 @@ bash_command_name_stat_hook (name)
|
||||
result = search_for_command (cname, 0);
|
||||
if (result)
|
||||
{
|
||||
+ FREE (*name);
|
||||
*name = result;
|
||||
return 1;
|
||||
}
|
||||
diff --git a/builtins/evalstring.c b/builtins/evalstring.c
|
||||
index df3dd68e..20c6a4a7 100644
|
||||
--- builtins/evalstring.c
|
||||
+++ builtins/evalstring.c
|
||||
@@ -461,6 +461,8 @@ parse_and_execute (string, from_file, flags)
|
||||
should_jump_to_top_level = 0;
|
||||
last_result = last_command_exit_value = EX_BADUSAGE;
|
||||
set_pipestatus_from_exit (last_command_exit_value);
|
||||
+ dispose_command(command);
|
||||
+ global_command = (COMMAND *)NULL;
|
||||
reset_parser ();
|
||||
break;
|
||||
}
|
||||
@@ -762,6 +764,8 @@ open_redir_file (r, fnp)
|
||||
|
||||
if (fnp)
|
||||
*fnp = fn;
|
||||
+ else
|
||||
+ free (fn);
|
||||
return fd;
|
||||
}
|
||||
|
||||
diff --git a/examples/loadables/stat.c b/examples/loadables/stat.c
|
||||
index 1e60e7b6..ed5c9764 100644
|
||||
--- examples/loadables/stat.c
|
||||
+++ examples/loadables/stat.c
|
||||
@@ -349,6 +349,7 @@ loadstat (vname, var, fname, flags, fmt, sp)
|
||||
key = savestring (arraysubs[i]);
|
||||
value = statval (i, fname, flags, fmt, sp);
|
||||
v = bind_assoc_variable (var, vname, key, value, ASS_FORCE);
|
||||
+ free (value);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
diff --git a/subst.c b/subst.c
|
||||
index 1ac6eb2d..ff0602da 100644
|
||||
--- subst.c
|
||||
+++ subst.c
|
||||
@@ -10727,6 +10727,7 @@ comsub:
|
||||
{
|
||||
chk_atstar (temp, quoted, pflags, quoted_dollar_at_p, contains_dollar_at);
|
||||
tdesc = parameter_brace_expand_word (temp, SPECIAL_VAR (temp, 0), quoted, pflags, 0);
|
||||
+ free (temp1);
|
||||
if (tdesc == &expand_wdesc_error || tdesc == &expand_wdesc_fatal)
|
||||
return (tdesc);
|
||||
ret = tdesc;
|
||||
@@ -10739,6 +10740,7 @@ comsub:
|
||||
{
|
||||
set_exit_status (EXECUTION_FAILURE);
|
||||
report_error (_("%s: invalid variable name for name reference"), temp);
|
||||
+ free (temp1);
|
||||
return (&expand_wdesc_error); /* XXX */
|
||||
}
|
||||
else
|
||||
--
|
||||
2.43.0
|
31
bash/sums
31
bash/sums
|
@ -1,31 +0,0 @@
|
|||
bash-5.1.tar.gz
|
||||
bash-5.1.tar.gz.sig
|
||||
dot.bashrc
|
||||
dot.bash_profile
|
||||
dot.bash_logout
|
||||
system.bashrc
|
||||
system.bash_logout
|
||||
bash51-001
|
||||
bash51-001.sig
|
||||
bash51-002
|
||||
bash51-002.sig
|
||||
bash51-003
|
||||
bash51-003.sig
|
||||
bash51-004
|
||||
bash51-004.sig
|
||||
bash51-005
|
||||
bash51-005.sig
|
||||
bash51-006
|
||||
bash51-006.sig
|
||||
bash51-007
|
||||
bash51-007.sig
|
||||
bash51-008
|
||||
bash51-008.sig
|
||||
bash51-009
|
||||
bash51-009.sig
|
||||
bash51-010
|
||||
bash51-010.sig
|
||||
bash51-011
|
||||
bash51-011.sig
|
||||
bash51-012
|
||||
bash51-012.sig
|
31
bash/sums.0
31
bash/sums.0
|
@ -1,31 +0,0 @@
|
|||
f42f2fee923bc2209f406a1892772121c467f44533bedfe00a176139da5d310a # bash52-001
|
||||
3a16ed6925e88255f9bf1435d418a11fc73a05b9efe65f4049e1de00f867d495 # bash52-001.sig
|
||||
45cc5e1b876550eee96f95bffb36c41b6cb7c07d33f671db5634405cd00fd7b8 # bash52-002
|
||||
3e1518df8be46d80d513132ab2b2b85c8832acb79b3aeecc27a5cee9f9ea55f8 # bash52-002.sig
|
||||
6a090cdbd334306fceacd0e4a1b9e0b0678efdbbdedbd1f5842035990c8abaff # bash52-003
|
||||
40875e5f67e0632c96250557e77b74b85d8fd13c9301acc192524a0169b5ac25 # bash52-003.sig
|
||||
38827724bba908cf5721bd8d4e595d80f02c05c35f3dd7dbc4cd3c5678a42512 # bash52-004
|
||||
2aeeba38424a8d0a9c34bdef45e6a49670bb2223f2785325913846ce112be21a # bash52-004.sig
|
||||
ece0eb544368b3b4359fb8464caa9d89c7a6743c8ed070be1c7d599c3675d357 # bash52-005
|
||||
f1c8e9be4aa8387927b2d299618c257c909abcd57d54798e3fffec4504b8abe4 # bash52-005.sig
|
||||
d1e0566a257d149a0d99d450ce2885123f9995e9c01d0a5ef6df7044a72a468c # bash52-006
|
||||
e1393530bc599240e0eb09a70b3382e987ab22ad10e6661ba77a4fbf38eead47 # bash52-006.sig
|
||||
2500a3fc21cb08133f06648a017cebfa27f30ea19c8cbe8dfefdf16227cfd490 # bash52-007
|
||||
0aeef6447173039444d9252c598c05540b76158639a985ccf5568cb876798b52 # bash52-007.sig
|
||||
6b4bd92fd0099d1bab436b941875e99e0cb3c320997587182d6267af1844b1e8 # bash52-008
|
||||
0064f392cf82a8a281a7598f55ebcf7b45b08cfed5d53d60827214f7d38a7f2f # bash52-008.sig
|
||||
f95a817882eaeb0cb78bce82859a86bbb297a308ced730ebe449cd504211d3cd # bash52-009
|
||||
822f9f0e67710248874d53e9b0e26bf1c8cfa0d117cc9bcc3479732f231eb43b # bash52-009.sig
|
||||
c7705e029f752507310ecd7270aef437e8043a9959e4d0c6065a82517996c1cd # bash52-010
|
||||
0c63fbb628dd3370cbae71b3112ce9c4b803fcab2d423dd2bd47010ec3c19ad0 # bash52-010.sig
|
||||
831b5f25bf3e88625f3ab315043be7498907c551f86041fa3b914123d79eb6f4 # bash52-011
|
||||
6bb9007fb328b5442ca1580b14f913aa93dfb21b1d174cd35458bae7c276f4cb # bash52-011.sig
|
||||
2fb107ce1fb8e93f36997c8b0b2743fc1ca98a454c7cc5a3fcabec533f67d42c # bash52-012
|
||||
2f34efb5bec9cfac100224eb08889a1b9cf2cfb354952fb6971a44ff287604b2 # bash52-012.sig
|
||||
094b4fd81bc488a26febba5d799689b64d52a5505b63e8ee854f48d356bc7ce6 # bash52-013
|
||||
cc67cf35ef48c3f01838a3b44e9169179e4e98339ac9f2bd4709e0ffc9ff40ca # bash52-013.sig
|
||||
3ef9246f2906ef1e487a0a3f4c647ae1c289cbd8459caa7db5ce118ef136e624 # bash52-014
|
||||
27f135050b6d251eaf4fb42bf07a3b94e71606d0137ee24d1f42f11436616aaa # bash52-014.sig
|
||||
ef73905169db67399a728e238a9413e0d689462cb9b72ab17a05dba51221358a # bash52-015
|
||||
5f8d42f6af8e488dfc13193a7cf7c5a738b537cdacee1a8144bb0c38b0f689f1) # bash52-015.sig
|
||||
|
Loading…
Reference in a new issue