git.samba.org
/
vlendec
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d33d43f
)
libsmb: Allow passing in NULL to smb2_create_blob_find()
author
Volker Lendecke
<vl@samba.org>
Tue, 4 Feb 2020 13:03:48 +0000
(15:03 +0200)
committer
Jeremy Allison
<jra@samba.org>
Fri, 7 Feb 2020 21:01:30 +0000
(21:01 +0000)
Will simplify callers a bit, and it does not change semantics
significantly. Zero create blobs won't find anything anyway.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
libcli/smb/smb2_create_blob.c
patch
|
blob
|
history
diff --git
a/libcli/smb/smb2_create_blob.c
b/libcli/smb/smb2_create_blob.c
index bb994f28e2f881e4961cd339fe093bb7ced148fc..57c7a9d1150c4c469863a0166fa66a2afeffde4b 100644
(file)
--- a/
libcli/smb/smb2_create_blob.c
+++ b/
libcli/smb/smb2_create_blob.c
@@
-213,6
+213,10
@@
struct smb2_create_blob *smb2_create_blob_find(const struct smb2_create_blobs *b
{
uint32_t i;
+ if (b == NULL) {
+ return NULL;
+ }
+
for (i=0; i < b->num_blobs; i++) {
if (strcmp(b->blobs[i].tag, tag) == 0) {
return &b->blobs[i];