]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add parentheses to NM_BIG_BUF macro
authorOndřej Surý <ondrej@sury.org>
Fri, 6 Mar 2026 10:08:47 +0000 (11:08 +0100)
committerMartin Basti <mbasti@isc.org>
Thu, 13 Aug 2026 09:47:36 +0000 (11:47 +0200)
The NM_BIG_BUF macro expands without parentheses, which can cause
incorrect evaluation due to operator precedence when used in
expressions.

lib/isc/netmgr/netmgr-int.h

index 28aedd765415ca49c97d4294a4e4b3d5915e48f1..bd4d6fbaecfa60bed7505c58ecd711aa3dae270b 100644 (file)
@@ -102,7 +102,7 @@ STATIC_ASSERT(ISC_NETMGR_TCP_RECVBUF_SIZE <= ISC_NETMGR_RECVBUF_SIZE,
  * most in TCPDNS or TLSDNS connections, so there's no risk of overrun
  * when using a buffer this size.
  */
-#define NM_BIG_BUF ISC_NETMGR_TCP_RECVBUF_SIZE * 2
+#define NM_BIG_BUF (ISC_NETMGR_TCP_RECVBUF_SIZE * 2)
 
 /*%
  * Maximum segment size (MSS) of TCP socket on which the server responds to