1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

r16252: Fix Klocwork ID 1119, 1121.

Volker
This commit is contained in:
Volker Lendecke 2006-06-15 11:44:57 +00:00 committed by Gerald (Jerry) Carter
parent 4974c598c0
commit 678bbcf061

View File

@ -628,6 +628,11 @@ static int new_machine (struct pdb_methods *in, const char *machine_in)
get_global_sam_sid();
if (strlen(machine_in) == 0) {
fprintf(stderr, "No machine name given\n");
return -1;
}
fstrcpy(machinename, machine_in);
machinename[15]= '\0';
@ -708,6 +713,11 @@ static int delete_machine_entry (struct pdb_methods *in, const char *machinename
{
fstring name;
struct samu *samaccount = NULL;
if (strlen(machinename) == 0) {
fprintf(stderr, "No machine name given\n");
return -1;
}
fstrcpy(name, machinename);
name[15] = '\0';