[openssh-commits] [openssh] 02/03: upstream: Check for gmtime failure in moduli generation. Based on

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Oct 4 13:41:10 AEST 2019


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 714031a10bbe378a395a93cf1040f4ee1451f45f
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date:   Fri Oct 4 03:26:58 2019 +0000

    upstream: Check for gmtime failure in moduli generation. Based on
    
    patch from krishnaiah.bommu at intel.com, ok djm@
    
    OpenBSD-Commit-ID: 4c6a4cde0022188ac83737de08da0e875704eeaa
---
 moduli.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/moduli.c b/moduli.c
index 578fc485..4f6f8da8 100644
--- a/moduli.c
+++ b/moduli.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: moduli.c,v 1.35 2019/07/03 03:24:02 deraadt Exp $ */
+/* $OpenBSD: moduli.c,v 1.36 2019/10/04 03:26:58 dtucker Exp $ */
 /*
  * Copyright 1994 Phil Karn <karn at qualcomm.com>
  * Copyright 1996-1998, 2003 William Allen Simpson <wsimpson at greendragon.com>
@@ -159,6 +159,8 @@ qfileout(FILE * ofile, u_int32_t otype, u_int32_t otests, u_int32_t otries,
 
 	time(&time_now);
 	gtm = gmtime(&time_now);
+	if (gtm == NULL)
+		return -1;
 
 	res = fprintf(ofile, "%04d%02d%02d%02d%02d%02d %u %u %u %u %x ",
 	    gtm->tm_year + 1900, gtm->tm_mon + 1, gtm->tm_mday,

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list