소스 검색

fix uninitialized mode variable in openat function

this was introduced in commit 2da3ab1382ca8e39eb1e4428103764a81fba73d3
as an oversight while making the variadic argument access conditional.
Rich Felker 10 년 전
부모
커밋
e146e6035f
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;