aboutsummaryrefslogtreecommitdiffstats
path: root/main/musl/0004-fix-uninitialized-mode-variable-in-openat-function.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/musl/0004-fix-uninitialized-mode-variable-in-openat-function.patch')
-rw-r--r--main/musl/0004-fix-uninitialized-mode-variable-in-openat-function.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/main/musl/0004-fix-uninitialized-mode-variable-in-openat-function.patch b/main/musl/0004-fix-uninitialized-mode-variable-in-openat-function.patch
new file mode 100644
index 0000000000..9385bc7c56
--- /dev/null
+++ b/main/musl/0004-fix-uninitialized-mode-variable-in-openat-function.patch
@@ -0,0 +1,27 @@
+From e146e6035fecea080fb17450db3c8bb44d36e07d Mon Sep 17 00:00:00 2001
+From: Rich Felker <dalias@aerifal.cx>
+Date: Fri, 31 Oct 2014 15:35:24 -0400
+Subject: [PATCH] fix uninitialized mode variable in openat function
+
+this was introduced in commit 2da3ab1382ca8e39eb1e4428103764a81fba73d3
+as an oversight while making the variadic argument access conditional.
+---
+ src/fcntl/openat.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/fcntl/openat.c b/src/fcntl/openat.c
+index 4faeb29..e741336 100644
+--- a/src/fcntl/openat.c
++++ b/src/fcntl/openat.c
+@@ -5,7 +5,7 @@
+
+ int openat(int fd, const char *filename, int flags, ...)
+ {
+- mode_t mode;
++ mode_t mode = 0;
+
+ if ((flags & O_CREAT) || (flags & O_TMPFILE) == O_TMPFILE) {
+ va_list ap;
+--
+2.2.0
+