Author: tuexen
Date: Sun Apr  8 16:24:37 2018
New Revision: 332282
URL: https://svnweb.freebsd.org/changeset/base/332282

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/10/sys/netinet/libalias/alias_sctp.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/libalias/alias_sctp.c
==============================================================================
--- stable/10/sys/netinet/libalias/alias_sctp.c Sun Apr  8 15:52:32 2018        
(r332281)
+++ stable/10/sys/netinet/libalias/alias_sctp.c Sun Apr  8 16:24:37 2018        
(r332282)
@@ -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_
 
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to