svn commit: samba r14419 - in trunk/source/libsmb: .
jra at samba.org
jra at samba.org
Wed Mar 15 03:27:58 GMT 2006
Author: jra
Date: 2006-03-15 03:27:57 +0000 (Wed, 15 Mar 2006)
New Revision: 14419
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14419
Log:
Try and fix Coverity #39 and #40 by making the
implicit function contract explicit.
Jeremy.
Modified:
trunk/source/libsmb/libsmbclient.c
Changeset:
Modified: trunk/source/libsmb/libsmbclient.c
===================================================================
--- trunk/source/libsmb/libsmbclient.c 2006-03-15 03:27:03 UTC (rev 14418)
+++ trunk/source/libsmb/libsmbclient.c 2006-03-15 03:27:57 UTC (rev 14419)
@@ -4826,11 +4826,19 @@
CONST_DISCARD(char *, the_acl));
if (!sd) {
- errno = EINVAL;
- return -1;
+ errno = EINVAL;
+ return -1;
}
}
+ /* SMBC_XATTR_MODE_REMOVE_ALL is the only caller
+ that doesn't deref sd */
+
+ if (!sd && (mode != SMBC_XATTR_MODE_REMOVE_ALL)) {
+ errno = EINVAL;
+ return -1;
+ }
+
/* The desired access below is the only one I could find that works
with NT4, W2KP and Samba */
More information about the samba-cvs
mailing list