summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-25 01:16:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:04:36 -0500
commitdef9a12bccd7113658220086fb32d388b47faaf7 (patch)
treed93a805d681c945fbeea07612061256ed26a22c9
parent06d9380114aef28969edbd9782f6aa528343b493 (diff)
downloadsamba-def9a12bccd7113658220086fb32d388b47faaf7.tar.gz
samba-def9a12bccd7113658220086fb32d388b47faaf7.tar.bz2
samba-def9a12bccd7113658220086fb32d388b47faaf7.zip
r3173: make the RAW-QFILEINFO test cope better with null strings from the server
(This used to be commit a10fca41de7e19e610bf9fd0a854b7b35d652561)
-rw-r--r--source4/torture/raw/qfileinfo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/torture/raw/qfileinfo.c b/source4/torture/raw/qfileinfo.c
index 951769d4da..3e62cc8493 100644
--- a/source4/torture/raw/qfileinfo.c
+++ b/source4/torture/raw/qfileinfo.c
@@ -115,7 +115,7 @@ static union smb_fileinfo *fname_find(const char *name)
ret = False; \
}} while(0)
-#define STR_EQUAL(n1, v1, n2, v2) do {if (strcmp(s1->n1.out.v1.s, s2->n2.out.v2.s) || \
+#define STR_EQUAL(n1, v1, n2, v2) do {if (strcmp_safe(s1->n1.out.v1.s, s2->n2.out.v2.s) || \
s1->n1.out.v1.private_length != s2->n2.out.v2.private_length) { \
printf("%s/%s [%s/%d] != %s/%s [%s/%d] at %s(%d)\n", \
#n1, #v1, s1->n1.out.v1.s, s1->n1.out.v1.private_length, \
@@ -502,14 +502,14 @@ BOOL torture_raw_qfileinfo(int dummy)
#define NAME_CHECK(sname, stype, tfield, flags) do { \
s1 = fnum_find(sname); \
- if (s1 && (strcmp(s1->stype.out.tfield.s, correct_name) != 0 || \
+ if (s1 && (strcmp_safe(s1->stype.out.tfield.s, correct_name) != 0 || \
wire_bad_flags(&s1->stype.out.tfield, flags, cli))) { \
printf("(%d) handle %s/%s incorrect - '%s/%d'\n", __LINE__, #stype, #tfield, \
s1->stype.out.tfield.s, s1->stype.out.tfield.private_length); \
ret = False; \
} \
s1 = fname_find(sname); \
- if (s1 && (strcmp(s1->stype.out.tfield.s, correct_name) != 0 || \
+ if (s1 && (strcmp_safe(s1->stype.out.tfield.s, correct_name) != 0 || \
wire_bad_flags(&s1->stype.out.tfield, flags, cli))) { \
printf("(%d) path %s/%s incorrect - '%s/%d'\n", __LINE__, #stype, #tfield, \
s1->stype.out.tfield.s, s1->stype.out.tfield.private_length); \
@@ -532,7 +532,7 @@ BOOL torture_raw_qfileinfo(int dummy)
s1->all_info.out.fname.s);
ret = False;
} else {
- if (strcmp(correct_name, p) != 0) {
+ if (strcmp_safe(correct_name, p) != 0) {
printf("incorrect basename in all_info/fname - '%s'\n",
s1->all_info.out.fname.s);
ret = False;