aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2004-01-20 09:13:20 +0000
committerCorinna Vinschen <corinna@vinschen.de>2004-01-20 09:13:20 +0000
commitfb69e3ed46c312023e57d5f2a84efa4afc13caaf (patch)
treecc2a9ae0619e7b65cccad87657d7e46cb615e1e2 /winsup
parent2ad4f99232c7137226edb5a40a484e18cca82f10 (diff)
downloadnewlib-fb69e3ed46c312023e57d5f2a84efa4afc13caaf.zip
newlib-fb69e3ed46c312023e57d5f2a84efa4afc13caaf.tar.gz
newlib-fb69e3ed46c312023e57d5f2a84efa4afc13caaf.tar.bz2
* sec_acl.cc (setacl): Make sure sd_ret is large enough.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/sec_acl.cc5
2 files changed, 9 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 9309d10..16c5856 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+2004-01-20 Christopher Faylor <cgf@redhat.com>
+
+ * sec_acl.cc (setacl): Make sure sd_ret is large enough.
+
2004-01-19 Christopher Faylor <cgf@redhat.com>
* sigproc.cc (sigproc_terminate): Don't close sendsig handle when
diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc
index 4d0f408..472c203 100644
--- a/winsup/cygwin/sec_acl.cc
+++ b/winsup/cygwin/sec_acl.cc
@@ -212,6 +212,11 @@ setacl (const char *file, int nentries, __aclent32_t *aclbufp)
__seterrno ();
return -1;
}
+ if (!sd_ret.realloc (sd_size))
+ {
+ set_errno (ENOMEM);
+ return -1;
+ }
if (!MakeSelfRelativeSD (&sd, sd_ret, &sd_size))
{
__seterrno ();