mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
check to see if copy_passwd_struct() ever receives its own internal
buffer as an argument :-) :-)
This commit is contained in:
parent
93298bca1c
commit
0d1f5e5a6d
@ -557,6 +557,13 @@ struct passwd *copy_passwd_struct(struct passwd *pass)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (pass == &pw_ret)
|
||||
{
|
||||
/* catch silly error where buffer was already copied */
|
||||
DEBUG(0,("copy_passwd_struct: can't copy internal buffer!\n"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memcpy((char *)&pw_ret, pass, sizeof(struct passwd));
|
||||
|
||||
if (pass->pw_name)
|
||||
|
Loading…
Reference in New Issue
Block a user