=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh-keygen.c,v retrieving revision 1.297 retrieving revision 1.298 diff -u -r1.297 -r1.298 --- src/usr.bin/ssh/ssh-keygen.c 2017/03/06 00:44:51 1.297 +++ src/usr.bin/ssh/ssh-keygen.c 2017/03/06 02:03:20 1.298 @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.297 2017/03/06 00:44:51 dtucker Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.298 2017/03/06 02:03:20 dtucker Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1994 Tatu Ylonen , Espoo, Finland @@ -1068,7 +1068,7 @@ struct known_hosts_ctx *ctx = (struct known_hosts_ctx *)_ctx; char *hashed, *cp, *hosts, *ohosts; int has_wild = l->hosts && strcspn(l->hosts, "*?!") != strlen(l->hosts); - int was_hashed = l->hosts[0] == HASH_DELIM; + int was_hashed = l->hosts && l->hosts[0] == HASH_DELIM; switch (l->status) { case HKF_STATUS_OK: