git.samba.org
/
gd
/
samba-autobuild
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
smbXsrv_client: make sure that we store a valid blob
[gd/samba-autobuild/.git]
/
source3
/
smbd
/
smbXsrv_client.c
diff --git
a/source3/smbd/smbXsrv_client.c
b/source3/smbd/smbXsrv_client.c
index f81fff40bb7794c2adeffeaabce45060738fa109..ec5b5f1d04c24d60a034e868802b3f8acff488df 100644
(file)
--- a/
source3/smbd/smbXsrv_client.c
+++ b/
source3/smbd/smbXsrv_client.c
@@
-294,6
+294,13
@@
NTSTATUS smb2srv_client_lookup_global(struct smbXsrv_client *client,
return NT_STATUS_OBJECTID_NOT_FOUND;
}
return NT_STATUS_OBJECTID_NOT_FOUND;
}
+ if (global == NULL) {
+ /*
+ * most likely ndr_pull_struct_blob() failed
+ */
+ return NT_STATUS_INTERNAL_DB_CORRUPTION;
+ }
+
*_global = global;
return NT_STATUS_OK;
}
*_global = global;
return NT_STATUS_OK;
}
@@
-375,6
+382,10
@@
static NTSTATUS smbXsrv_client_global_store(struct smbXsrv_client_global0 *globa
* store the information in the old format.
*/
* store the information in the old format.
*/
+ SMB_ASSERT(global->local_address != NULL);
+ SMB_ASSERT(global->remote_address != NULL);
+ SMB_ASSERT(global->remote_name != NULL);
+
if (global->db_rec == NULL) {
return NT_STATUS_INTERNAL_ERROR;
}
if (global->db_rec == NULL) {
return NT_STATUS_INTERNAL_ERROR;
}