Przeglądaj źródła

dont rely on random stack state to trigger this issue; force the default stat structs to alternative bit masks

Mike Frysinger 19 lat temu
rodzic
commit
297503eec5
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3 0
      test/stat/memcmp-stat.c

+ 3 - 0
test/stat/memcmp-stat.c

@@ -72,6 +72,9 @@ int main()
 	int fd;
 	struct stat fst, st;
 
+	memset(&fst, 0xAA, sizeof(fst));
+	memset(&st, 0x55, sizeof(st));
+
 	unlink(".testfile");
 	fd = open(".testfile", O_WRONLY | O_CREAT | O_EXCL, 0);
 	if (fd < 0) {