From: Volker Lendecke Date: Sun, 15 Jul 2007 09:37:36 +0000 (+0000) Subject: r23877: Fix two segfaults in (very unlikely) error paths, found by the IBM X-Git-Tag: samba-misc-tags/initial-v3-2-unstable~718 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33068885e62f3681644c128e381822d48298ea05;p=thirdparty%2Fsamba.git r23877: Fix two segfaults in (very unlikely) error paths, found by the IBM checker. --- diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 1659c8fcbdb..080eb36b420 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -2998,6 +2998,7 @@ static BOOL marshall_posix_acl(connection_struct *conn, char *pdata, SMB_STRUCT_ uid_t *puid = (uid_t *)SMB_VFS_SYS_ACL_GET_QUALIFIER(conn, entry); if (!puid) { DEBUG(0,("marshall_posix_acl: SMB_VFS_SYS_ACL_GET_QUALIFIER failed.\n")); + return False; } own_grp = (unsigned int)*puid; SMB_VFS_SYS_ACL_FREE_QUALIFIER(conn, (void *)puid,tagtype); @@ -3017,6 +3018,7 @@ static BOOL marshall_posix_acl(connection_struct *conn, char *pdata, SMB_STRUCT_ gid_t *pgid= (gid_t *)SMB_VFS_SYS_ACL_GET_QUALIFIER(conn, entry); if (!pgid) { DEBUG(0,("marshall_posix_acl: SMB_VFS_SYS_ACL_GET_QUALIFIER failed.\n")); + return False; } own_grp = (unsigned int)*pgid; SMB_VFS_SYS_ACL_FREE_QUALIFIER(conn, (void *)pgid,tagtype);