[openssh-commits] [openssh] 01/02: upstream: asprintf returns -1, not an arbitrary value < 0. Also
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Jul 5 11:10:48 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 e8c974043c1648eab0ad67a7ba6a3e444fe79d2d
Author: deraadt at openbsd.org <deraadt at openbsd.org>
Date: Fri Jun 28 05:44:09 2019 +0000
upstream: asprintf returns -1, not an arbitrary value < 0. Also
upon error the (very sloppy specification) leaves an undefined value in *ret,
so it is wrong to inspect it, the error condition is enough. discussed a
little with nicm, and then much more with millert until we were exasperated
OpenBSD-Commit-ID: 29258fa51edf8115d244b9d4b84028487bf8923e
---
auth2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/auth2.c b/auth2.c
index 16ae1a36..9b08757a 100644
--- a/auth2.c
+++ b/auth2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth2.c,v 1.155 2019/03/25 22:34:52 djm Exp $ */
+/* $OpenBSD: auth2.c,v 1.156 2019/06/28 05:44:09 deraadt Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
@@ -717,7 +717,7 @@ auth2_record_info(Authctxt *authctxt, const char *fmt, ...)
i = vasprintf(&authctxt->auth_method_info, fmt, ap);
va_end(ap);
- if (i < 0 || authctxt->auth_method_info == NULL)
+ if (i == -1)
fatal("%s: vasprintf failed", __func__);
}
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list