r25186: Fix a memory corruption in base-mangle
[tprouty/samba.git] / source4 / torture / basic / mangle_test.c
index 729e2c5c43639b6e5ca14d4325bcdf1ab804e333..dc7bc21a5586f4ee6f577de92d1c226b31516d48 100644 (file)
@@ -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);
        }