diff options
author | djm@openbsd.org <djm@openbsd.org> | 2023-03-27 05:31:05 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2023-03-27 05:31:57 +0200 |
commit | 009eb4cb48a9708ab9174684dcbcc0f942907abe (patch) | |
tree | ed787b9d2c175a819cc91634c2ef8d8ea4406e54 /addr.c | |
parent | upstream: scp: when copying local->remote, check that source file (diff) | |
download | openssh-009eb4cb48a9708ab9174684dcbcc0f942907abe.tar.xz openssh-009eb4cb48a9708ab9174684dcbcc0f942907abe.zip |
upstream: fix test: getnameinfo returns a non-zero value on error, not
(neccessarily) -1. From GHPR#384
OpenBSD-Commit-ID: d35e2b71268f66f5543a7ea68751972b3ae22b25
Diffstat (limited to 'addr.c')
-rw-r--r-- | addr.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: addr.c,v 1.6 2022/10/28 02:29:34 djm Exp $ */ +/* $OpenBSD: addr.c,v 1.7 2023/03/27 03:31:05 djm Exp $ */ /* * Copyright (c) 2004-2008 Damien Miller <djm@mindrot.org> @@ -443,7 +443,7 @@ addr_ntop(const struct xaddr *n, char *p, size_t len) if (p == NULL || len == 0) return -1; if (getnameinfo(_SA(&ss), slen, p, len, NULL, 0, - NI_NUMERICHOST) == -1) + NI_NUMERICHOST) != 0) return -1; return 0; |