-/* $OpenBSD: umac.c,v 1.23 2023/03/07 01:30:52 djm Exp $ */
+/* $OpenBSD: umac.c,v 1.24 2025/05/23 11:25:35 dtucker Exp $ */
/* -----------------------------------------------------------------------
*
* umac.c -- C Implementation UMAC Message Authentication
* Version 0.93b of rfc4418.txt -- 2006 July 18
*
* For a full description of UMAC message authentication see the UMAC
- * world-wide-web page at http://www.cs.ucdavis.edu/~rogaway/umac
+ * world-wide-web page at https://fastcrypto.org/umac/
* Please report bugs and suggestions to the UMAC webpage.
*
* Copyright (c) 1999-2006 Ted Krovetz
}
/* pass remaining < L1_KEY_LEN bytes of input data to NH */
- if (len) {
+ if (len > 0 && len <= UINT32_MAX) {
nh_update(&ctx->hash, (const UINT8 *)input, len);
ctx->msg_len += len;
}