summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-09-16 10:30:31 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:06:47 -0500
commitab36db2f9d2341a5206584e2d74000515f0b08a0 (patch)
treef3c3de5d88b8349e0859c35c7f94ebfa2ee99aa8 /source4
parent2e3768843ae8a202e0a3a60224f6717fc34499ab (diff)
downloadsamba-ab36db2f9d2341a5206584e2d74000515f0b08a0.tar.gz
samba-ab36db2f9d2341a5206584e2d74000515f0b08a0.tar.bz2
samba-ab36db2f9d2341a5206584e2d74000515f0b08a0.zip
r25186: Fix a memory corruption in base-mangle
(This used to be commit 4822b3f0db11059281b33e896250f36e3b3448eb)
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/basic/mangle_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/torture/basic/mangle_test.c b/source4/torture/basic/mangle_test.c
index 729e2c5c43..dc7bc21a55 100644
--- a/source4/torture/basic/mangle_test.c
+++ b/source4/torture/basic/mangle_test.c
@@ -144,7 +144,7 @@ static char *gen_name(TALLOC_CTX *mem_ctx)
}
/* and a medium probability of a common lead string */
- if (random() % 10 == 0) {
+ if ((len > 5) && (random() % 10 == 0)) {
strncpy(p, "ABCDE", 5);
}