[openssh-commits] [openssh] 01/03: upstream: snprintf/vsnprintf return < 0 on error, rather than -1.

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Jul 5 11:15:37 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 8142fcaf9ed8ff66252deecbfd29fc59d5f2df4f
Author: deraadt at openbsd.org <deraadt at openbsd.org>
Date:   Wed Jul 3 03:24:02 2019 +0000

    upstream: snprintf/vsnprintf return < 0 on error, rather than -1.
    
    OpenBSD-Commit-ID: a261c421140a0639bb2b66bbceca72bf8239749d
---
 moduli.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/moduli.c b/moduli.c
index 7120415f..578fc485 100644
--- a/moduli.c
+++ b/moduli.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: moduli.c,v 1.34 2019/01/23 09:49:00 dtucker Exp $ */
+/* $OpenBSD: moduli.c,v 1.35 2019/07/03 03:24:02 deraadt Exp $ */
 /*
  * Copyright 1994 Phil Karn <karn at qualcomm.com>
  * Copyright 1996-1998, 2003 William Allen Simpson <wsimpson at greendragon.com>
@@ -453,7 +453,7 @@ write_checkpoint(char *cpfile, u_int32_t lineno)
 	int r;
 
 	r = snprintf(tmp, sizeof(tmp), "%s.XXXXXXXXXX", cpfile);
-	if (r == -1 || r >= PATH_MAX) {
+	if (r < 0 || r >= PATH_MAX) {
 		logit("write_checkpoint: temp pathname too long");
 		return;
 	}

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


More information about the openssh-commits mailing list