Ver código fonte

tests: fdopen: add missing mode args to open()

We call open() with O_CREAT, so make sure we pass in the mode else
we might get build errors with fortify source.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger 13 anos atrás
pai
commit
7064156385
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      test/misc/fdopen.c

+ 1 - 1
test/misc/fdopen.c

@@ -33,7 +33,7 @@ main (int argc, char *argv[])
   assert (fclose (fp) == 0);
   fp = NULL;
 
-  fd = open (name, O_RDWR|O_CREAT);
+  fd = open (name, O_RDWR|O_CREAT, 0660);
   assert (fd != -1);
   assert (lseek (fd, 5, SEEK_SET) == 5);