=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/authfile.c,v retrieving revision 1.88 retrieving revision 1.89 diff -u -r1.88 -r1.89 --- src/usr.bin/ssh/authfile.c 2011/05/04 21:15:29 1.88 +++ src/usr.bin/ssh/authfile.c 2011/05/10 05:46:46 1.89 @@ -1,4 +1,4 @@ -/* $OpenBSD: authfile.c,v 1.88 2011/05/04 21:15:29 djm Exp $ */ +/* $OpenBSD: authfile.c,v 1.89 2011/05/10 05:46:46 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -749,6 +749,9 @@ case '\0': continue; } + /* Abort loading if this looks like a private key */ + if (strncmp(cp, "-----BEGIN", 10) == 0) + break; /* Skip leading whitespace. */ for (; *cp && (*cp == ' ' || *cp == '\t'); cp++) ;