diff options
-rw-r--r-- | source4/torture/rpc/wkssvc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/torture/rpc/wkssvc.c b/source4/torture/rpc/wkssvc.c index d5ef0a4fda..736e1e60d6 100644 --- a/source4/torture/rpc/wkssvc.c +++ b/source4/torture/rpc/wkssvc.c @@ -964,14 +964,16 @@ static bool test_NetrMessageBufferSend(struct torture_context *tctx, struct wkssvc_NetrMessageBufferSend r; const char *message = SMBTORTURE_MESSAGE; size_t size; - uint8_t *msg; + uint16_t *msg; - push_ucs2_talloc(tctx, (void **)&msg, message, &size); + if (!push_ucs2_talloc(tctx, &msg, message, &size)) { + return false; + } r.in.server_name = dcerpc_server_name(p); r.in.message_name = dcerpc_server_name(p); r.in.message_sender_name = dcerpc_server_name(p); - r.in.message_buffer = msg; + r.in.message_buffer = (uint8_t *)msg; r.in.message_size = size; torture_comment(tctx, "testing NetrMessageBufferSend\n"); |