From: dtucker@openbsd.org Date: Wed, 11 Feb 2026 16:57:38 +0000 (+0000) Subject: upstream: Pass actual size of the buffer to hostname() instead of a X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1b9e0f7f1f1ed5be2bd1c39bda03fc99a1cf5d8;p=thirdparty%2Fopenssh-portable.git upstream: Pass actual size of the buffer to hostname() instead of a define that's probably the same. ok millert@ djm@ OpenBSD-Commit-ID: 7c97b22439100b4193404ccfa1e5f539c5a8d039 --- diff --git a/gss-serv.c b/gss-serv.c index ae3465c3b..f9ae303b5 100644 --- a/gss-serv.c +++ b/gss-serv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gss-serv.c,v 1.36 2026/02/08 15:28:01 dtucker Exp $ */ +/* $OpenBSD: gss-serv.c,v 1.37 2026/02/11 16:57:38 dtucker Exp $ */ /* * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. @@ -107,7 +107,7 @@ ssh_gssapi_acquire_cred(Gssctxt *ctx) gss_create_empty_oid_set(&status, &oidset); gss_add_oid_set_member(&status, ctx->oid, &oidset); - if (gethostname(lname, HOST_NAME_MAX)) { + if (gethostname(lname, sizeof(lname))) { gss_release_oid_set(&status, &oidset); return (-1); }