Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Apr 2018 14:09:27 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r332276 - stable/11/sys/netinet/libalias
Message-ID:  <201804081409.w38E9Rq5022460@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Sun Apr  8 14:09:27 2018
New Revision: 332276
URL: https://svnweb.freebsd.org/changeset/base/332276

Log:
  MFC r327203:
  
  Allow the first (and second) argument of sn_calloc() be a sum.
  This fixes a bug reported in
  https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224103
  
  PR:		224103

Modified:
  stable/11/sys/netinet/libalias/alias_sctp.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet/libalias/alias_sctp.c
==============================================================================
--- stable/11/sys/netinet/libalias/alias_sctp.c	Sun Apr  8 13:40:38 2018	(r332275)
+++ stable/11/sys/netinet/libalias/alias_sctp.c	Sun Apr  8 14:09:27 2018	(r332276)
@@ -185,7 +185,7 @@ static MALLOC_DEFINE(M_SCTPNAT, "sctpnat", "sctp nat d
 /* Use kernel allocator. */
 #ifdef _SYS_MALLOC_H_
 #define	sn_malloc(x)	malloc(x, M_SCTPNAT, M_NOWAIT|M_ZERO)
-#define	sn_calloc(n,x)	sn_malloc(x * n)
+#define	sn_calloc(n,x)	sn_malloc((x) * (n))
 #define	sn_free(x)	free(x, M_SCTPNAT)
 #endif// #ifdef _SYS_MALLOC_H_
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804081409.w38E9Rq5022460>