1
0
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:
Luke Leighton 0001-01-01 00:00:00 +00:00
parent 93298bca1c
commit 0d1f5e5a6d

View File

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