* sec_acl.cc (setacl): Make sure sd_ret is large enough.

This commit is contained in:
Corinna Vinschen 2004-01-20 09:13:20 +00:00
parent 2ad4f99232
commit fb69e3ed46
2 changed files with 9 additions and 0 deletions

View File

@ -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> 2004-01-19 Christopher Faylor <cgf@redhat.com>
* sigproc.cc (sigproc_terminate): Don't close sendsig handle when * sigproc.cc (sigproc_terminate): Don't close sendsig handle when

View File

@ -212,6 +212,11 @@ setacl (const char *file, int nentries, __aclent32_t *aclbufp)
__seterrno (); __seterrno ();
return -1; return -1;
} }
if (!sd_ret.realloc (sd_size))
{
set_errno (ENOMEM);
return -1;
}
if (!MakeSelfRelativeSD (&sd, sd_ret, &sd_size)) if (!MakeSelfRelativeSD (&sd, sd_ret, &sd_size))
{ {
__seterrno (); __seterrno ();