ensure key_fd is filled when DSA is disabled; spotted by tb@
authordjm <djm@openbsd.org>
Thu, 11 Jan 2024 01:51:16 +0000 (01:51 +0000)
committerdjm <djm@openbsd.org>
Thu, 11 Jan 2024 01:51:16 +0000 (01:51 +0000)
usr.bin/ssh/ssh-keysign.c

index 8f36d9f..97a117e 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keysign.c,v 1.72 2024/01/11 01:45:36 djm Exp $ */
+/* $OpenBSD: ssh-keysign.c,v 1.73 2024/01/11 01:51:16 djm Exp $ */
 /*
  * Copyright (c) 2002 Markus Friedl.  All rights reserved.
  *
@@ -190,6 +190,9 @@ main(int argc, char **argv)
        if (fd > 2)
                close(fd);
 
+       for (i = 0; i < NUM_KEYTYPES; i++)
+               key_fd[i] = -1;
+
        i = 0;
        /* XXX This really needs to read sshd_config for the paths */
 #ifdef WITH_DSA