summaryrefslogtreecommitdiff
path: root/moduli.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2019-10-09 22:59:48 +0100
committerColin Watson <cjwatson@debian.org>2019-10-09 22:59:48 +0100
commit4213eec74e74de6310c27a40c3e9759a08a73996 (patch)
treee97a6dcafc6763aea7c804e4e113c2750cb1400d /moduli.c
parent102062f825fb26a74295a1c089c00c4c4c76b68a (diff)
parentcdf1d0a9f5d18535e0a18ff34860e81a6d83aa5c (diff)
Import openssh_8.1p1.orig.tar.gz
Diffstat (limited to 'moduli.c')
-rw-r--r--moduli.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/moduli.c b/moduli.c
index 7120415fd..4f6f8da8d 100644
--- a/moduli.c
+++ b/moduli.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: moduli.c,v 1.34 2019/01/23 09:49:00 dtucker Exp $ */ 1/* $OpenBSD: moduli.c,v 1.36 2019/10/04 03:26:58 dtucker Exp $ */
2/* 2/*
3 * Copyright 1994 Phil Karn <karn@qualcomm.com> 3 * Copyright 1994 Phil Karn <karn@qualcomm.com>
4 * Copyright 1996-1998, 2003 William Allen Simpson <wsimpson@greendragon.com> 4 * Copyright 1996-1998, 2003 William Allen Simpson <wsimpson@greendragon.com>
@@ -159,6 +159,8 @@ qfileout(FILE * ofile, u_int32_t otype, u_int32_t otests, u_int32_t otries,
159 159
160 time(&time_now); 160 time(&time_now);
161 gtm = gmtime(&time_now); 161 gtm = gmtime(&time_now);
162 if (gtm == NULL)
163 return -1;
162 164
163 res = fprintf(ofile, "%04d%02d%02d%02d%02d%02d %u %u %u %u %x ", 165 res = fprintf(ofile, "%04d%02d%02d%02d%02d%02d %u %u %u %u %x ",
164 gtm->tm_year + 1900, gtm->tm_mon + 1, gtm->tm_mday, 166 gtm->tm_year + 1900, gtm->tm_mon + 1, gtm->tm_mday,
@@ -453,7 +455,7 @@ write_checkpoint(char *cpfile, u_int32_t lineno)
453 int r; 455 int r;
454 456
455 r = snprintf(tmp, sizeof(tmp), "%s.XXXXXXXXXX", cpfile); 457 r = snprintf(tmp, sizeof(tmp), "%s.XXXXXXXXXX", cpfile);
456 if (r == -1 || r >= PATH_MAX) { 458 if (r < 0 || r >= PATH_MAX) {
457 logit("write_checkpoint: temp pathname too long"); 459 logit("write_checkpoint: temp pathname too long");
458 return; 460 return;
459 } 461 }