View | Details | Raw Unified | Return to bug 260117
Collapse All | Expand All

(-)b/lib/libc/net/sctp_sys_calls.c (-4 / +4 lines)
Lines 407-412 sctp_getpaddrs(int sd, sctp_assoc_t id, struct sockaddr **raddrs) Link Here
407
		return (-1);
407
		return (-1);
408
	}
408
	}
409
	/* size required is returned in 'asoc' */
409
	/* size required is returned in 'asoc' */
410
	if ((size_t)asoc == 0) {
411
		errno = ENOTCONN;
412
		return (-1);
413
	}
410
	opt_len = (socklen_t)((size_t)asoc + sizeof(struct sctp_getaddresses));
414
	opt_len = (socklen_t)((size_t)asoc + sizeof(struct sctp_getaddresses));
411
	addrs = calloc(1, (size_t)opt_len);
415
	addrs = calloc(1, (size_t)opt_len);
412
	if (addrs == NULL) {
416
	if (addrs == NULL) {
Lines 463-472 sctp_getladdrs(int sd, sctp_assoc_t id, struct sockaddr **raddrs) Link Here
463
		errno = ENOMEM;
467
		errno = ENOMEM;
464
		return (-1);
468
		return (-1);
465
	}
469
	}
466
	if (size_of_addresses == 0) {
467
		errno = ENOTCONN;
468
		return (-1);
469
	}
470
	opt_len = (socklen_t)(size_of_addresses + sizeof(struct sctp_getaddresses));
470
	opt_len = (socklen_t)(size_of_addresses + sizeof(struct sctp_getaddresses));
471
	addrs = calloc(1, (size_t)opt_len);
471
	addrs = calloc(1, (size_t)opt_len);
472
	if (addrs == NULL) {
472
	if (addrs == NULL) {

Return to bug 260117