diff options
author | Garming Sam <garming@catalyst.net.nz> | 2019-03-12 11:16:38 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-04-08 02:07:22 +0000 |
commit | fc2e521a5e34988547de27a024a180b83d6504ee (patch) | |
tree | f76ca6d2429af4718f5ccd07359f57b1a429cb52 | |
parent | 43cacaad5715d481327064b0602c93f93954561d (diff) | |
download | samba-fc2e521a5e34988547de27a024a180b83d6504ee.tar.gz |
libnet vampire: NULL access bug fix
NULL pointer access bug fix
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r-- | source4/libnet/libnet_vampire.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/libnet/libnet_vampire.c b/source4/libnet/libnet_vampire.c index 6374946244e..0a2f62d703b 100644 --- a/source4/libnet/libnet_vampire.c +++ b/source4/libnet/libnet_vampire.c @@ -554,7 +554,12 @@ WERROR libnet_vampire_cb_schema_chunk(void *private_data, s->schema_part.last_object->next_object = talloc_steal(s->schema_part.last_object, first_object); } - for (cur = first_object; cur->next_object; cur = cur->next_object) {} + if (first_object != NULL) { + for (cur = first_object; cur->next_object; cur = cur->next_object) {} + } else { + cur = first_object; + } + s->schema_part.last_object = cur; if (!c->partition->more_data) { |