mirror of
https://github.com/samba-team/samba.git
synced 2025-03-12 20:58:37 +03:00
heimdal:kdc: Accommodate NULL data parameter in krb5_pac_get_buffer()
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
This commit is contained in:
parent
8f4b78907b
commit
6199a07635
@ -394,10 +394,12 @@ krb5_pac_get_buffer(krb5_context context, krb5_pac p,
|
||||
if (p->pac->buffers[i].type != type)
|
||||
continue;
|
||||
|
||||
ret = krb5_data_copy(data, (unsigned char *)p->data.data + offset, len);
|
||||
if (ret) {
|
||||
krb5_set_error_message(context, ret, N_("malloc: out of memory", ""));
|
||||
return ret;
|
||||
if (data) {
|
||||
ret = krb5_data_copy(data, (unsigned char *)p->data.data + offset, len);
|
||||
if (ret) {
|
||||
krb5_set_error_message(context, ret, N_("malloc: out of memory", ""));
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user