1
0
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:
Jeremy Allison
-
parent 506b5e34c3
commit ce4f461965
3 changed files with 21 additions and 26 deletions

View File

@@ -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;