mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
r11638: fixed handling of null volume name in RAW-QFSINFO test
thanks to Stephen Zarkos for finding this
(This used to be commit 8331eee64c
)
This commit is contained in:
parent
a2d2128b8a
commit
498b2892dd
@ -83,9 +83,8 @@ static union smb_fsinfo *find(const char *name)
|
||||
ret = False; \
|
||||
}} while(0)
|
||||
|
||||
#define STR_EQUAL(n1, v1, n2, v2) do {if (!s1->n1.out.v1 && !s2->n2.out.v2) return True; \
|
||||
if (!s1->n1.out.v1 || !s2->n2.out.v2) return False; \
|
||||
if (strcmp(s1->n1.out.v1, s2->n2.out.v2)) { \
|
||||
#define STR_EQUAL(n1, v1, n2, v2) do { \
|
||||
if (strcmp_safe(s1->n1.out.v1, s2->n2.out.v2)) { \
|
||||
printf("%s/%s [%s] != %s/%s [%s] at %s(%d)\n", \
|
||||
#n1, #v1, s1->n1.out.v1, \
|
||||
#n2, #v2, s2->n2.out.v2, \
|
||||
@ -287,7 +286,7 @@ BOOL torture_raw_qfsinfo(void)
|
||||
#define STR_CHECK(sname, stype, field, flags) do { \
|
||||
s1 = find(sname); \
|
||||
if (s1) { \
|
||||
if (wire_bad_flags(&s1->stype.out.field, flags, cli)) { \
|
||||
if (s1->stype.out.field.s && wire_bad_flags(&s1->stype.out.field, flags, cli)) { \
|
||||
printf("(%d) incorrect string termination in %s/%s\n", \
|
||||
__LINE__, #stype, #field); \
|
||||
ret = False; \
|
||||
@ -295,6 +294,7 @@ BOOL torture_raw_qfsinfo(void)
|
||||
}} while (0)
|
||||
|
||||
printf("check for correct termination\n");
|
||||
|
||||
STR_CHECK("VOLUME", volume, volume_name, 0);
|
||||
STR_CHECK("VOLUME_INFO", volume_info, volume_name, STR_UNICODE);
|
||||
STR_CHECK("VOLUME_INFORMATION", volume_info, volume_name, STR_UNICODE);
|
||||
|
Loading…
Reference in New Issue
Block a user