git.samba.org
/
kai
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
300343d
)
s4:libcli/smb2: fix compiler warning in smb2_push_o16s16_string()
author
Stefan Metzmacher
<metze@samba.org>
Mon, 21 Nov 2011 16:43:11 +0000
(17:43 +0100)
committer
Stefan Metzmacher
<metze@samba.org>
Thu, 24 Nov 2011 18:02:33 +0000
(19:02 +0100)
metze
source4/libcli/smb2/request.c
patch
|
blob
|
history
diff --git
a/source4/libcli/smb2/request.c
b/source4/libcli/smb2/request.c
index fae995a3967ea8161d8c25ee8cf800f04092a779..a2d633f8555663b95f11caea45272184146f18eb 100644
(file)
--- a/
source4/libcli/smb2/request.c
+++ b/
source4/libcli/smb2/request.c
@@
-689,6
+689,7
@@
NTSTATUS smb2_push_o16s16_string(struct smb2_request_buffer *buf,
DATA_BLOB blob;
NTSTATUS status;
bool ret;
+ void *ptr = NULL;
if (str == NULL) {
return smb2_push_o16s16_blob(buf, ofs, data_blob(NULL, 0));
@@
-701,10
+702,11
@@
NTSTATUS smb2_push_o16s16_string(struct smb2_request_buffer *buf,
}
ret = convert_string_talloc(buf->buffer, CH_UNIX, CH_UTF16,
- str, strlen(str),
(void **)&blob.data
, &blob.length);
+ str, strlen(str),
&ptr
, &blob.length);
if (!ret) {
return NT_STATUS_ILLEGAL_CHARACTER;
}
+ blob.data = (uint8_t *)ptr;
status = smb2_push_o16s16_blob(buf, ofs, blob);
data_blob_free(&blob);