Index: sctp_sys_calls.c =================================================================== RCS file: /usr/sctpCVS/KERN/usr.lib/sctp_sys_calls.c,v retrieving revision 1.79 diff -u -r1.79 sctp_sys_calls.c --- sctp_sys_calls.c 5 Jul 2007 11:16:34 -0000 1.79 +++ sctp_sys_calls.c 7 Jul 2007 07:21:10 -0000 @@ -645,6 +645,12 @@ msg, msg_len, addrs, l, sinfo, flags)); } #endif + + if (addrs == NULL) { + errno = EINVAL; + return (-1); + } + len = sizeof(int); at = addrs; cnt = 0; @@ -669,7 +675,7 @@ } buf = malloc(len); if (buf == NULL) { - return (ENOMEM); + return (-1); } aa = (int *)buf; *aa = cnt;