diff options
author | Andreas Schneider <asn@samba.org> | 2018-11-16 20:02:26 +0100 |
---|---|---|
committer | Gary Lockyer <gary@samba.org> | 2018-11-22 22:13:26 +0100 |
commit | dbdd57e31c09c71460eb2f7b0c646795682ebd88 (patch) | |
tree | 731c5f516763d5841f1b86807c7f7063ecc4fca9 /source3 | |
parent | dbeb806d4a3374076a9edf8c504e6e3f88fe9da7 (diff) | |
download | samba-dbdd57e31c09c71460eb2f7b0c646795682ebd88.tar.gz |
s3:tests: Initialize pointers with NULL in netdisplay test
Found by Undefined Sanitizer
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/netapi/tests/netdisplay.c | 6 | ||||
-rw-r--r-- | source3/lib/netapi/tests/netuser.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source3/lib/netapi/tests/netdisplay.c b/source3/lib/netapi/tests/netdisplay.c index 090792cec2f..d7967fa4150 100644 --- a/source3/lib/netapi/tests/netdisplay.c +++ b/source3/lib/netapi/tests/netdisplay.c @@ -39,9 +39,9 @@ static NET_API_STATUS test_netquerydisplayinformation(const char *hostname, uint32_t idx = 0; int i; - struct NET_DISPLAY_USER *user; - struct NET_DISPLAY_GROUP *group; - struct NET_DISPLAY_MACHINE *machine; + struct NET_DISPLAY_USER *user = NULL; + struct NET_DISPLAY_GROUP *group = NULL; + struct NET_DISPLAY_MACHINE *machine = NULL; printf("testing NetQueryDisplayInformation level %d\n", level); diff --git a/source3/lib/netapi/tests/netuser.c b/source3/lib/netapi/tests/netuser.c index de5f0a102d9..ad2bb53f18c 100644 --- a/source3/lib/netapi/tests/netuser.c +++ b/source3/lib/netapi/tests/netuser.c @@ -265,8 +265,8 @@ static NET_API_STATUS test_netusergetgroups(const char *hostname, uint8_t *buffer = NULL; int i; - struct GROUP_USERS_INFO_0 *i0; - struct GROUP_USERS_INFO_1 *i1; + struct GROUP_USERS_INFO_0 *i0 = NULL; + struct GROUP_USERS_INFO_1 *i1 = NULL; printf("testing NetUserGetGroups level %d\n", level); |