mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
r16371: Fix Klocwork #1048.
Jeremy. (This used to be commit 5057e90db32adf4395fc2a3fce26a7f64c780828)
This commit is contained in:
parent
96a54e7d23
commit
cc01fd242b
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user