From b51d823d927192b35cfbffd5dc78c4ad89628c6a Mon Sep 17 00:00:00 2001 From: John Scipione Date: Mon, 5 Mar 2012 20:23:43 -0500 Subject: [PATCH] Error if unsupported flag is passed to fstatat() --- src/build/libroot/fs_darwin.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/build/libroot/fs_darwin.cpp b/src/build/libroot/fs_darwin.cpp index 86206df0f7..cfcd4d2be8 100644 --- a/src/build/libroot/fs_darwin.cpp +++ b/src/build/libroot/fs_darwin.cpp @@ -285,6 +285,9 @@ fstatat(int fd, const char *path, struct stat *st, int flag) // CURRENTLY UNSUPPORTED errno = ENOTSUP; return -1; + } else if (flag != 0) { + errno = EINVAL; + return -1; } if (path != NULL && path[0] == '/') {