Issue12810: Remove check for negative unsigned value in socketmodule.c. Patch

by Joel Stanley.
This commit is contained in:
Charles-François Natali 2011-08-24 20:07:54 +02:00
parent e049f470cd
commit b09f25e9a3
2 changed files with 2 additions and 1 deletions

View File

@ -898,6 +898,7 @@ Nathan Srebro
RajGopal Srinivasan
Quentin Stafford-Fraser
Frank Stajano
Joel Stanley
Oliver Steele
Greg Stein
Chris Stern

View File

@ -1749,7 +1749,7 @@ cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space)
static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) +
sizeof(cmsgh->cmsg_len));
if (cmsgh == NULL || msg->msg_control == NULL || msg->msg_controllen < 0)
if (cmsgh == NULL || msg->msg_control == NULL)
return 0;
if (space < cmsg_len_end)
space = cmsg_len_end;