Author: vlendec Date: 2006-06-15 11:44:57 +0000 (Thu, 15 Jun 2006) New Revision: 16252
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16252 Log: Fix Klocwork ID 1119, 1121. Volker Modified: branches/SAMBA_3_0/source/utils/pdbedit.c trunk/source/utils/pdbedit.c Changeset: Modified: branches/SAMBA_3_0/source/utils/pdbedit.c =================================================================== --- branches/SAMBA_3_0/source/utils/pdbedit.c 2006-06-15 11:24:01 UTC (rev 16251) +++ branches/SAMBA_3_0/source/utils/pdbedit.c 2006-06-15 11:44:57 UTC (rev 16252) @@ -628,6 +628,11 @@ 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 @@ { 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'; Modified: trunk/source/utils/pdbedit.c =================================================================== --- trunk/source/utils/pdbedit.c 2006-06-15 11:24:01 UTC (rev 16251) +++ trunk/source/utils/pdbedit.c 2006-06-15 11:44:57 UTC (rev 16252) @@ -628,6 +628,11 @@ 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 @@ { 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';
