Author: metze Date: 2006-09-21 22:55:00 +0000 (Thu, 21 Sep 2006) New Revision: 18800
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18800 Log: fix a write behind the buffer bug... Thanks Herb for finding this:-) This was my bug, I typed it in on gd's laptop and he just run 'svn ci' metze Modified: branches/SAMBA_4_0/source/torture/rpc/samr.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/samr.c =================================================================== --- branches/SAMBA_4_0/source/torture/rpc/samr.c 2006-09-21 22:44:32 UTC (rev 18799) +++ branches/SAMBA_4_0/source/torture/rpc/samr.c 2006-09-21 22:55:00 UTC (rev 18800) @@ -1887,10 +1887,8 @@ char *v = generate_random_str(mem_ctx, 1); int i; - for (i=0; i <ARRAY_SIZE(simple_pass); i++) { - simple_pass[i] = *v; - } - simple_pass[i] = '\0'; + ZERO_STRUCT(simple_pass); + memset(simple_pass, *v, sizeof(simple_pass) - 1); /* test what happens when picking a simple password */ if (!test_ChangePasswordUser3(p, mem_ctx, acct_name, 0, password, simple_pass, 0, True)) {