mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-28 12:05:47 +08:00
* sec_acl.cc (acl32): Fix potnetial crash if build_fh_name returns NULL.
This commit is contained in:
parent
74daacfd31
commit
60ecc3d68b
@ -1,3 +1,7 @@
|
|||||||
|
2012-03-29 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* sec_acl.cc (acl32): Fix potnetial crash if build_fh_name returns NULL.
|
||||||
|
|
||||||
2012-03-29 Christopher Faylor <me.cygwin2012@cgf.cx>
|
2012-03-29 Christopher Faylor <me.cygwin2012@cgf.cx>
|
||||||
|
|
||||||
* exceptions.cc (ctrl_c_handler): Don't generate a SIGINT if we've
|
* exceptions.cc (ctrl_c_handler): Don't generate a SIGINT if we've
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* sec_acl.cc: Sun compatible ACL functions.
|
/* sec_acl.cc: Sun compatible ACL functions.
|
||||||
|
|
||||||
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
|
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
|
||||||
2009, 2010, 2011 Red Hat, Inc.
|
2009, 2010, 2011, 2012 Red Hat, Inc.
|
||||||
|
|
||||||
Written by Corinna Vinschen <corinna@vinschen.de>
|
Written by Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
@ -451,13 +451,13 @@ acl32 (const char *path, int cmd, int nentries, __aclent32_t *aclbufp)
|
|||||||
|
|
||||||
fhandler_base *fh = build_fh_name (path, PC_SYM_FOLLOW | PC_KEEP_HANDLE,
|
fhandler_base *fh = build_fh_name (path, PC_SYM_FOLLOW | PC_KEEP_HANDLE,
|
||||||
stat_suffixes);
|
stat_suffixes);
|
||||||
if (fh->error ())
|
if (!fh || !fh->exists ())
|
||||||
|
set_errno (ENOENT);
|
||||||
|
else if (fh->error ())
|
||||||
{
|
{
|
||||||
debug_printf ("got %d error from build_fh_name", fh->error ());
|
debug_printf ("got %d error from build_fh_name", fh->error ());
|
||||||
set_errno (fh->error ());
|
set_errno (fh->error ());
|
||||||
}
|
}
|
||||||
else if (!fh->exists ())
|
|
||||||
set_errno (ENOENT);
|
|
||||||
else
|
else
|
||||||
res = fh->facl (cmd, nentries, aclbufp);
|
res = fh->facl (cmd, nentries, aclbufp);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user