summaryrefslogtreecommitdiff
path: root/source3/torture/torture.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/torture/torture.c')
-rw-r--r--source3/torture/torture.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index e2a2744dae..b0c74e2f37 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -7338,8 +7338,14 @@ static bool run_shortname_test(int dummy)
goto out;
}
- strlcpy(fname, "\\shortname\\", sizeof(fname));
- strlcat(fname, "test .txt", sizeof(fname));
+ if (strlcpy(fname, "\\shortname\\", sizeof(fname)) >= sizeof(fname)) {
+ correct = false;
+ goto out;
+ }
+ if (strlcat(fname, "test .txt", sizeof(fname)) >= sizeof(fname)) {
+ correct = false;
+ goto out;
+ }
s.val = false;