diff options
Diffstat (limited to 'source3/rpc_parse/parse_reg.c')
-rw-r--r-- | source3/rpc_parse/parse_reg.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c index 332f38ab26..c9e09b6528 100644 --- a/source3/rpc_parse/parse_reg.c +++ b/source3/rpc_parse/parse_reg.c @@ -1484,8 +1484,10 @@ void init_reg_q_shutdown(REG_Q_SHUTDOWN *q_u, const char *msg, q_u->server = TALLOC_P( get_talloc_ctx(), uint16 ); *q_u->server = 0x1; - q_u->message = TALLOC_P( get_talloc_ctx(), UNISTR4 ); - init_unistr4( q_u->message, msg, UNI_FLAGS_NONE ); + if ( msg && *msg ) { + q_u->message = TALLOC_P( get_talloc_ctx(), UNISTR4 ); + init_unistr4( q_u->message, msg, UNI_FLAGS_NONE ); + } q_u->timeout = timeout; @@ -1535,6 +1537,8 @@ BOOL reg_io_q_shutdown(const char *desc, REG_Q_SHUTDOWN *q_u, prs_struct *ps, if (!prs_pointer("server", ps, depth, (void**)&q_u->server, sizeof(uint16), (PRS_POINTER_CAST)prs_uint16)) return False; + if (!prs_align(ps)) + return False; if (!prs_pointer("message", ps, depth, (void**)&q_u->message, sizeof(UNISTR4), (PRS_POINTER_CAST)prs_unistr4)) return False; @@ -1593,6 +1597,8 @@ BOOL reg_io_q_shutdown_ex(const char *desc, REG_Q_SHUTDOWN_EX *q_u, prs_struct * if (!prs_pointer("server", ps, depth, (void**)&q_u->server, sizeof(uint16), (PRS_POINTER_CAST)prs_uint16)) return False; + if (!prs_align(ps)) + return False; if (!prs_pointer("message", ps, depth, (void**)&q_u->message, sizeof(UNISTR4), (PRS_POINTER_CAST)prs_unistr4)) return False; @@ -1666,6 +1672,8 @@ BOOL reg_io_q_abort_shutdown(const char *desc, REG_Q_ABORT_SHUTDOWN *q_u, if (!prs_pointer("server", ps, depth, (void**)&q_u->server, sizeof(uint16), (PRS_POINTER_CAST)prs_uint16)) return False; + if (!prs_align(ps)) + return False; return True; } |