浏览代码

fix uninitialized mode variable in openat function

this was introduced in commit 2da3ab1382ca8e39eb1e4428103764a81fba73d3
as an oversight while making the variadic argument access conditional.

(cherry picked from commit e146e6035fecea080fb17450db3c8bb44d36e07d)
Rich Felker 10 年之前
父节点
当前提交
e48fff8d33
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/fcntl/openat.c

+ 1 - 1
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;