]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/keychain.c
lib: Allow adding arrays of ferr's
[mirror_frr.git] / lib / keychain.c
index c3e1a6d3c4fa409f58e2f632ba215782101d8ce2..494f6f643088f988f9ff8630d02adcdb2a7d6520 100644 (file)
@@ -172,7 +172,7 @@ struct key *key_match_for_accept(const struct keychain *keychain,
                if (key->accept.start == 0
                    || (key->accept.start <= now
                        && (key->accept.end >= now || key->accept.end == -1)))
-                       if (strncmp(key->string, auth_str, 16) == 0)
+                       if (key->string && (strncmp(key->string, auth_str, 16) == 0))
                                return key;
        }
        return NULL;