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
This commit is contained in:
dtucker@openbsd.org
2026-02-11 16:57:38 +00:00
committed by Darren Tucker
parent 4ef24496b7
commit f1b9e0f7f1

View File

@@ -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);
}