summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/masktest.c3
-rw-r--r--source3/torture/torture.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/source3/torture/masktest.c b/source3/torture/masktest.c
index 9bb34dfe45..6b9c302aa3 100644
--- a/source3/torture/masktest.c
+++ b/source3/torture/masktest.c
@@ -267,7 +267,8 @@ static NTSTATUS listfn(const char *mnt, struct file_info *f, const char *s,
return NT_STATUS_OK;
}
- fstrcpy(state->short_name, f->short_name);
+
+ fstrcpy(state->short_name, f->short_name ? f->short_name : "");
strlower_m(state->short_name);
*state->pp_long_name = SMB_STRDUP(f->name);
if (!*state->pp_long_name) {
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 64f8bf77b6..8f251b7f2b 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -7081,13 +7081,13 @@ static NTSTATUS shortname_list_fn(const char *mnt, struct file_info *finfo,
#endif
if (strchr(force_shortname_chars, i)) {
- if (!finfo->short_name[0]) {
+ if (!finfo->short_name) {
/* Shortname not created when it should be. */
d_printf("(%s) ERROR: Shortname was not created for file %s containing %d\n",
__location__, finfo->name, i);
s->val = true;
}
- } else if (finfo->short_name[0]){
+ } else if (finfo->short_name){
/* Shortname created when it should not be. */
d_printf("(%s) ERROR: Shortname %s was created for file %s\n",
__location__, finfo->short_name, finfo->name);