mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s4:kdc: Be sure not to pass a NULL pointer into strcmp()
To do so is to invoke undefined behaviour. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
41d974389e
commit
d902c134d7
@ -696,7 +696,9 @@ krb5_error_code samba_kdc_message2entry_keys(krb5_context context,
|
||||
}
|
||||
|
||||
for (i=0; i < scb.sub.num_packages; i++) {
|
||||
if (strcmp("Primary:Kerberos-Newer-Keys", scb.sub.packages[i].name) == 0) {
|
||||
if (scb.sub.packages[i].name != NULL &&
|
||||
strcmp("Primary:Kerberos-Newer-Keys", scb.sub.packages[i].name) == 0)
|
||||
{
|
||||
scpk = &scb.sub.packages[i];
|
||||
if (!scpk->data || !scpk->data[0]) {
|
||||
scpk = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user