From: djm Date: Tue, 7 Sep 2021 06:03:51 +0000 (+0000) Subject: avoid NULL deref in -Y find-principals. Report and fix from X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c05ef66598a004c1e173a5d0fd4cdf5403f2ad99;p=openbsd avoid NULL deref in -Y find-principals. Report and fix from Carlo Marcelo Arenas Belón --- diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c index c7992c94255..9057f73e197 100644 --- a/usr.bin/ssh/ssh-keygen.c +++ b/usr.bin/ssh/ssh-keygen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.435 2021/08/11 08:54:17 djm Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.436 2021/09/07 06:03:51 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1994 Tatu Ylonen , Espoo, Finland @@ -2657,7 +2657,8 @@ sig_process_opts(char * const *opts, size_t nopts, uint64_t *verify_timep, time_t now; *verify_timep = 0; - *print_pubkey = 0; + if (print_pubkey == NULL) + *print_pubkey = 0; for (i = 0; i < nopts; i++) { if (strncasecmp(opts[i], "verify-time=", 12) == 0) { if (parse_absolute_time(opts[i] + 12,