-/* $OpenBSD: auth.c,v 1.22 2023/07/03 09:40:47 claudio Exp $ */
+/* $OpenBSD: auth.c,v 1.23 2023/11/07 11:29:05 claudio Exp $ */
/*
* Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org>
fatalx("auth_gen: ibuf_set failed");
if (ibuf_set(buf, offsetof(struct ospf_hdr, auth_key),
- iface->auth_key, strlen(iface->auth_key)) == -1)
+ iface->auth_key, strnlen(iface->auth_key,
+ sizeof(iface->auth_key))) == -1)
fatalx("auth_gen: ibuf_set failed");
break;
case AUTH_CRYPT: