[SCM] Samba Shared Repository - branch v3-6-test updated
Volker Lendecke
vlendec at samba.org
Fri Apr 22 03:46:50 MDT 2011
The branch, v3-6-test has been updated
via 045895d s3: Fix Coverity ID 2047, UNUSED_VALUE
via fab8a81 s3: Fix Coverity ID 2325, RESOURCE_LEAK (cherry picked from commit 726fa732facef55da6a27750f9daf12145db6639)
via ec2513c s3: Fix Coverity ID 2336, NULL_RETURNS (cherry picked from commit f9e3af71d391027de353f0240f70e425e766c0e5)
via 13d72e4 s3: Fix Coverity ID 2335, CHECKED_RETURN (cherry picked from commit 018595e2587b5b5dd90bf318a1cf8b675e47b66b)
via ec3ca4b asn1: Fix Coverity ID 2299, CHECKED_RETURN (cherry picked from commit 4981adcca37391b6745f10f5849fedd7c944410d)
via 135cb71 s3: Fix Coverity ID 2307, NULL_RETURNS (cherry picked from commit 3e8a8fad59cfdd053ad96afc39ea7d6e98b91764)
via e3c2715 s3: Fix Coverity ID 986, BUFFER_SIZE_WARNING
via 139336b s3: Fix Coverity ID 1340, NULL_RETURNS (cherry picked from commit 7e7ad53cbd77ce2201fd46bd2c08a601725f9f5b)
from 67636bb Cosmetic. Fix bad indentation.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test
- Log -----------------------------------------------------------------
commit 045895d9e23edc6aa47f90eefe92799c80f746a3
Author: Volker Lendecke <vl at samba.org>
Date: Fri Apr 22 10:05:42 2011 +0200
s3: Fix Coverity ID 2047, UNUSED_VALUE
Autobuild-User: Volker Lendecke <vlendec at samba.org>
Autobuild-Date: Fri Apr 22 10:53:24 CEST 2011 on sn-devel-104
(cherry picked from commit b48e22347d9b2d0b3b128197b4ef662558b0f2e9)
commit fab8a81963897659814b339254f2409292272a5d
Author: Volker Lendecke <vl at samba.org>
Date: Fri Apr 22 09:51:42 2011 +0200
s3: Fix Coverity ID 2325, RESOURCE_LEAK
(cherry picked from commit 726fa732facef55da6a27750f9daf12145db6639)
commit ec2513cc5baa1aafc173887a7dec45660506cf35
Author: Volker Lendecke <vl at samba.org>
Date: Fri Apr 22 09:48:10 2011 +0200
s3: Fix Coverity ID 2336, NULL_RETURNS
(cherry picked from commit f9e3af71d391027de353f0240f70e425e766c0e5)
commit 13d72e42e17c05c63670ce102981e9f8dd038290
Author: Volker Lendecke <vl at samba.org>
Date: Fri Apr 22 09:45:54 2011 +0200
s3: Fix Coverity ID 2335, CHECKED_RETURN
(cherry picked from commit 018595e2587b5b5dd90bf318a1cf8b675e47b66b)
commit ec3ca4ba431fdccfb3fdd3ddf13189158db8ab62
Author: Volker Lendecke <vl at samba.org>
Date: Fri Apr 22 09:41:52 2011 +0200
asn1: Fix Coverity ID 2299, CHECKED_RETURN
(cherry picked from commit 4981adcca37391b6745f10f5849fedd7c944410d)
commit 135cb711f0b052c37595f64e1859606c8d0e58b2
Author: Volker Lendecke <vl at samba.org>
Date: Fri Apr 22 09:39:37 2011 +0200
s3: Fix Coverity ID 2307, NULL_RETURNS
(cherry picked from commit 3e8a8fad59cfdd053ad96afc39ea7d6e98b91764)
commit e3c271560adfab50568e06c7bfaba02cb5aae997
Author: Volker Lendecke <vl at samba.org>
Date: Fri Apr 22 09:34:35 2011 +0200
s3: Fix Coverity ID 986, BUFFER_SIZE_WARNING
strncpy can leave the destination unterminated
(cherry picked from commit 9a0676d5c947033ac41f700be9ba92ab1666814e)
commit 139336bd8b58cea93c82f7da9c100d6cccfe5180
Author: Volker Lendecke <vl at samba.org>
Date: Thu Apr 21 22:09:27 2011 +0200
s3: Fix Coverity ID 1340, NULL_RETURNS
(cherry picked from commit 7e7ad53cbd77ce2201fd46bd2c08a601725f9f5b)
-----------------------------------------------------------------------
Summary of changes:
lib/util/asn1.c | 6 +++++-
source3/lib/smbconf/smbconf_reg.c | 4 ++++
source3/lib/sysquotas_nfs.c | 4 ++++
source3/libads/ldap.c | 4 ++++
source3/libsmb/libsmb_dir.c | 4 ++++
source3/registry/reg_backend_db.c | 2 --
source3/rpc_client/cli_pipe.c | 2 +-
source3/smbd/reply.c | 4 +++-
8 files changed, 25 insertions(+), 5 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/util/asn1.c b/lib/util/asn1.c
index f4a6bc5..b716da6 100644
--- a/lib/util/asn1.c
+++ b/lib/util/asn1.c
@@ -290,7 +290,11 @@ bool ber_write_partial_OID_String(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const ch
/* Add partially encoded sub-identifier */
if (p) {
DATA_BLOB tmp_blob = strhex_to_data_blob(tmp_ctx, p);
- data_blob_append(mem_ctx, blob, tmp_blob.data, tmp_blob.length);
+ if (!data_blob_append(mem_ctx, blob, tmp_blob.data,
+ tmp_blob.length)) {
+ talloc_free(tmp_ctx);
+ return false;
+ }
}
talloc_free(tmp_ctx);
diff --git a/source3/lib/smbconf/smbconf_reg.c b/source3/lib/smbconf/smbconf_reg.c
index adac233..67df03c 100644
--- a/source3/lib/smbconf/smbconf_reg.c
+++ b/source3/lib/smbconf/smbconf_reg.c
@@ -714,6 +714,10 @@ static WERROR smbconf_reg_drop(struct smbconf_ctx *ctx)
goto done;
}
p = strrchr(path, '\\');
+ if (p == NULL) {
+ werr = WERR_INVALID_PARAM;
+ goto done;
+ }
*p = '\0';
werr = reg_open_path(mem_ctx, path, REG_KEY_WRITE, token,
&parent_key);
diff --git a/source3/lib/sysquotas_nfs.c b/source3/lib/sysquotas_nfs.c
index 8272f53..eff5874 100644
--- a/source3/lib/sysquotas_nfs.c
+++ b/source3/lib/sysquotas_nfs.c
@@ -134,6 +134,10 @@ int sys_get_nfs_quota(const char *path, const char *bdev,
memset(cutstr, '\0', len+1);
host = strncat(cutstr, mnttype, sizeof(char) * len);
testpath = strchr_m(mnttype, ':');
+ if (testpath == NULL) {
+ errno = EINVAL;
+ goto out;
+ }
testpath++;
gq_args.gqa_pathp = testpath;
gq_args.gqa_uid = id.uid;
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index 3ce7a7e..90c645c 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -3502,6 +3502,10 @@ ADS_STATUS ads_leave_realm(ADS_STRUCT *ads, const char *hostname)
}
hostnameDN = ads_get_dn(ads, talloc_tos(), (LDAPMessage *)msg);
+ if (hostnameDN == NULL) {
+ SAFE_FREE(host);
+ return ADS_ERROR_SYSTEM(ENOENT);
+ }
rc = ldap_delete_ext_s(ads->ldap.ld, hostnameDN, pldap_control, NULL);
if (rc) {
diff --git a/source3/libsmb/libsmb_dir.c b/source3/libsmb/libsmb_dir.c
index 9939e25..c0c6e83 100644
--- a/source3/libsmb/libsmb_dir.c
+++ b/source3/libsmb/libsmb_dir.c
@@ -518,6 +518,10 @@ SMBC_opendir_ctx(SMBCCTX *context,
ip_list = (struct ip_service *)memdup(
&server_addr, sizeof(server_addr));
if (ip_list == NULL) {
+ if (dir) {
+ SAFE_FREE(dir->fname);
+ SAFE_FREE(dir);
+ }
TALLOC_FREE(frame);
errno = ENOMEM;
return NULL;
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index 4aed6e7..6024a35 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -1596,8 +1596,6 @@ static WERROR regdb_fetch_keys_internal(struct db_context *db, const char *key,
DEBUG(11,("regdb_fetch_keys: Enter key => [%s]\n", key ? key : "NULL"));
- frame = talloc_stackframe();
-
if (!regdb_key_exists(db, key)) {
DEBUG(10, ("key [%s] not found\n", key));
werr = WERR_NOT_FOUND;
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 266e436..d40d999 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -2691,7 +2691,7 @@ NTSTATUS rpc_pipe_open_ncalrpc(TALLOC_CTX *mem_ctx, const char *socket_path,
ZERO_STRUCT(addr);
addr.sun_family = AF_UNIX;
- strncpy(addr.sun_path, socket_path, sizeof(addr.sun_path));
+ strlcpy(addr.sun_path, socket_path, sizeof(addr.sun_path));
if (sys_connect(fd, (struct sockaddr *)(void *)&addr) == -1) {
DEBUG(0, ("connect(%s) failed: %s\n", socket_path,
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 9659522..01d4332 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -456,7 +456,9 @@ static bool netbios_session_retarget(struct smbd_server_connection *sconn,
p = strchr_m(retarget, '#');
if (p != NULL) {
*p++ = '\0';
- sscanf(p, "%x", &retarget_type);
+ if (sscanf(p, "%x", &retarget_type) != 1) {
+ goto fail;
+ }
}
ret = resolve_name(retarget, &retarget_addr, retarget_type, false);
--
Samba Shared Repository
More information about the samba-cvs
mailing list