diff options
author | deraadt@openbsd.org <deraadt@openbsd.org> | 2019-06-27 18:03:37 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-06-28 11:30:18 +1000 |
commit | 5cdbaa78fcb718c39af4522d98016ad89d065427 (patch) | |
tree | 8bd947edc2f0139849a76efdcf97f96465683cc9 /auth-options.c | |
parent | b2e3e57be4a933d9464bccbe592573725765486f (diff) |
upstream: Some asprintf() calls were checked < 0, rather than the
precise == -1. ok millert nicm tb, etc
OpenBSD-Commit-ID: caecf8f57938685c04f125515b9f2806ad408d53
Diffstat (limited to 'auth-options.c')
-rw-r--r-- | auth-options.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/auth-options.c b/auth-options.c index b05d6d6f3..4923a83b7 100644 --- a/auth-options.c +++ b/auth-options.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: auth-options.c,v 1.84 2018/10/03 06:38:35 djm Exp $ */ | 1 | /* $OpenBSD: auth-options.c,v 1.85 2019/06/27 18:03:37 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Damien Miller <djm@mindrot.org> | 3 | * Copyright (c) 2018 Damien Miller <djm@mindrot.org> |
4 | * | 4 | * |
@@ -332,7 +332,7 @@ handle_permit(const char **optsp, int allow_bare_port, | |||
332 | * Allow a bare port number in permitlisten to indicate a | 332 | * Allow a bare port number in permitlisten to indicate a |
333 | * listen_host wildcard. | 333 | * listen_host wildcard. |
334 | */ | 334 | */ |
335 | if (asprintf(&tmp, "*:%s", opt) < 0) { | 335 | if (asprintf(&tmp, "*:%s", opt) == -1) { |
336 | *errstrp = "memory allocation failed"; | 336 | *errstrp = "memory allocation failed"; |
337 | return -1; | 337 | return -1; |
338 | } | 338 | } |