Skip to content

Commit 01cb4a7

Browse files
committed
limit.rlim_cur can be negative (RLIM_INFINITY)
1 parent 69dd050 commit 01cb4a7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/selectmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ newDevPollObject(PyObject *module)
11881188
** allocate huge amounts of memory or even fail to allocate.
11891189
*/
11901190
out_size = limit.rlim_cur;
1191-
if (out_size > DEVPOLL_MAX_OUT_BUFFER_SIZE) {
1191+
if ((rlim_t)out_size > DEVPOLL_MAX_OUT_BUFFER_SIZE) {
11921192
out_size = DEVPOLL_MAX_OUT_BUFFER_SIZE;
11931193
}
11941194

0 commit comments

Comments
 (0)