]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: Pass actual size of the buffer to hostname() instead of a
authordtucker@openbsd.org <dtucker@openbsd.org>
Wed, 11 Feb 2026 16:57:38 +0000 (16:57 +0000)
committerDarren Tucker <dtucker@dtucker.net>
Wed, 11 Feb 2026 17:40:07 +0000 (12:40 -0500)
define that's probably the same.  ok millert@ djm@

OpenBSD-Commit-ID: 7c97b22439100b4193404ccfa1e5f539c5a8d039

gss-serv.c

index ae3465c3ba89089bb284dda48eefd22a08103644..f9ae303b5b140f58005586e6db3b7808522bcb8b 100644 (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);
                }