diff options
author | Jeremy Allison <jra@samba.org> | 2006-06-19 22:55:03 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:18:50 -0500 |
commit | cc01fd242be450f4598eec50956403d2298ad5a4 (patch) | |
tree | 3f3318155c1edfc345617aa4c88153626a461f04 /source3/rpc_parse | |
parent | 96a54e7d23070b6779134dac393406a770e6f581 (diff) | |
download | samba-cc01fd242be450f4598eec50956403d2298ad5a4.tar.gz samba-cc01fd242be450f4598eec50956403d2298ad5a4.tar.bz2 samba-cc01fd242be450f4598eec50956403d2298ad5a4.zip |
r16371: Fix Klocwork #1048.
Jeremy.
(This used to be commit 5057e90db32adf4395fc2a3fce26a7f64c780828)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r-- | source3/rpc_parse/parse_ntsvcs.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/rpc_parse/parse_ntsvcs.c b/source3/rpc_parse/parse_ntsvcs.c index 24bf3a455b..599257e802 100644 --- a/source3/rpc_parse/parse_ntsvcs.c +++ b/source3/rpc_parse/parse_ntsvcs.c @@ -299,8 +299,12 @@ BOOL ntsvcs_io_q_get_hw_profile_info(const char *desc, NTSVCS_Q_GET_HW_PROFILE_I q_u->buffer_size = 0x000000a8; - if ( UNMARSHALLING(ps) ) + if ( UNMARSHALLING(ps) ) { q_u->buffer = TALLOC_ARRAY(get_talloc_ctx(), uint8, q_u->buffer_size ); + if (!q_u->buffer) { + return False; + } + } if ( !prs_uint8s(True, "buffer", ps, depth, q_u->buffer, q_u->buffer_size) ) return False; @@ -329,8 +333,12 @@ BOOL ntsvcs_io_r_get_hw_profile_info(const char *desc, NTSVCS_R_GET_HW_PROFILE_I if ( !prs_align(ps) ) return False; - if ( UNMARSHALLING(ps) ) + if ( UNMARSHALLING(ps) ) { r_u->buffer = TALLOC_ARRAY(get_talloc_ctx(), uint8, r_u->buffer_size ); + if (!r_u->buffer) { + return False; + } + } if ( !prs_uint8s(True, "buffer", ps, depth, r_u->buffer, r_u->buffer_size) ) return False; |