1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

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>
This commit is contained in:
Garming Sam 2019-03-12 11:16:38 +13:00 committed by Andrew Bartlett
parent 43cacaad57
commit fc2e521a5e

View File

@ -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) {