mirror of
https://github.com/samba-team/samba.git
synced 2025-12-07 20:23:50 +03:00
Never free anything in the rpc_parse/prs_XXX functions. Do it in the enclosing
function. lib/util_unistr.c: Check lengths *before* reading source - prevent uninitialised memory reads. Jeremy.
This commit is contained in:
@@ -853,16 +853,6 @@ static BOOL lsa_io_trans_names(char *desc, LSA_TRANS_NAME_ENUM *trn,
|
||||
if(!prs_align(ps))
|
||||
return False;
|
||||
}
|
||||
|
||||
/* Free memory if we've sent it */
|
||||
|
||||
if (MARSHALLING(ps)) {
|
||||
safe_free(trn->name);
|
||||
safe_free(trn->uni_name);
|
||||
|
||||
trn->name = NULL;
|
||||
trn->uni_name = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return True;
|
||||
|
||||
Reference in New Issue
Block a user