Bug #3489 ยป thread-NULL-deref.patch
thread.c | ||
---|---|---|
if (o < sizeof(fd_set)) o = sizeof(fd_set);
|
||
if (m > o) {
|
||
fds->fdset = realloc(fds->fdset, m);
|
||
fds->fdset = xrealloc(fds->fdset, m);
|
||
memset((char *)fds->fdset + o, 0, m - o);
|
||
}
|
||
if (n >= fds->maxfd) fds->maxfd = n + 1;
|
||
... | ... | |
if (size < sizeof(fd_set)) size = sizeof(fd_set);
|
||
dst->maxfd = max;
|
||
dst->fdset = realloc(dst->fdset, size);
|
||
dst->fdset = xrealloc(dst->fdset, size);
|
||
memcpy(dst->fdset, src, size);
|
||
}
|