From 6113960bd518368ae42c603883bbd0ac14a38cb1 Mon Sep 17 00:00:00 2001 From: jay Date: Thu, 24 May 2007 08:32:51 +0000 Subject: [PATCH] Savannah bug #19948: Fixed an assertion failure on IRIX 6.5 (O_NOFOLLOW is defined to 0 there) --- ChangeLog | 4 ++++ NEWS | 3 +++ find/util.c | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 61781eb..889b038 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-05-24 James Youngman + * find/util.c (check_nofollow): If O_NOFOLLOW is defined but 0, + act as if it is undefined. This should prevent a runtime + assertion failure on IRIX 6.5. This fixes Savannah bug #19948. + * m4/noreturn.m4: New file, testing for support of __attribute__ ((__noreturn__)). Defines jy_AC_ATTRIBUTE_NORETURN and sets HAVE_ATTRIBUTE_NORETURN. diff --git a/NEWS b/NEWS index 392e7bb..152c11f 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,9 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout) Findutils should now build on systems which have the modf() function in the maths library, -lm. This includes some versions of HP-UX. +#19948: Fixed an assertion failure on IRIX 6.5 (O_NOFOLLOW is defined +to 0 there). + #19923: Fixed an array overrun in groups[] array of 'locate' when run by or as root. This bug appears not to be exploitable. If locate is not installed setuid, the bug is not exploitable. For setuid diff --git a/find/util.c b/find/util.c index 55ad9f2..de6c432 100644 --- a/find/util.c +++ b/find/util.c @@ -257,6 +257,11 @@ check_nofollow(void) struct utsname uts; float release; + if (0 == O_NOFOLLOW) + { + return false; + } + if (0 == uname(&uts)) { /* POSIX requires that atof() ignore "unrecognised suffixes". */ -- 2.11.4.GIT