diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-09-21 22:55:00 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:19:12 -0500 |
commit | 3c08e29f4fdde586084bdcf1b36eaf92ae944750 (patch) | |
tree | ede538f2156d848ff8a40eeea46c6c5f4efcf238 /source/torture/rpc | |
parent | 6c5f4af01fea1e3b38d18d5b1491cb22701317cf (diff) | |
download | samba-3c08e29f4fdde586084bdcf1b36eaf92ae944750.tar.gz |
r18800: 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
Diffstat (limited to 'source/torture/rpc')
-rw-r--r-- | source/torture/rpc/samr.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/torture/rpc/samr.c b/source/torture/rpc/samr.c index f9bd25dc37b..b387ec70bf3 100644 --- a/source/torture/rpc/samr.c +++ b/source/torture/rpc/samr.c @@ -1887,10 +1887,8 @@ static BOOL test_ChangePassword(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 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)) { |