Issue 455 in psutil: there is a small integer overflow bug in _psutil_linux.c

0 views
Skip to first unread message

psu...@googlecode.com

unread,
Dec 10, 2013, 5:05:41 AM12/10/13
to psutil-...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 455 by amo...@google.com: there is a small integer overflow bug
in _psutil_linux.c
http://code.google.com/p/psutil/issues/detail?id=455

What steps will reproduce the problem?

In [2]: psutil.RLIM_INFINITY
Out[2]: -1

What is the expected output?

In [2]: psutil.RLIM_INFINITY
Out[2]: 18446744073709551615L

What version of psutil are you using? What Python version?
1.2.1

On what operating system? Is it 32bit or 64bit version?
Ubuntu 64bit

Please provide any additional information below.

It's a simple integer overflow. The constant is an unsigned long,
PyModule_AddIntConstant accepts a signed one. I fixed it for me, patch is
attached.


Attachments:
overflow.patch 573 bytes

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

psu...@googlecode.com

unread,
May 26, 2014, 11:14:04 AM5/26/14
to psutil-...@googlegroups.com

Comment #1 on issue 455 by g.rodola: there is a small integer overflow bug
in _psutil_linux.c
http://code.google.com/p/psutil/issues/detail?id=455

psutil has been migrated from Google Code to Github (see:
http://grodola.blogspot.com/2014/05/goodbye-google-code-im-moving-to-github.html).
Please do NOT reply here but use this instead:
https://github.com/giampaolo/psutil/issues/455

psu...@googlecode.com

unread,
Jan 2, 2015, 7:41:58 AM1/2/15
to psutil-...@googlegroups.com
Updates:
Status: WontFix

Comment #2 on issue 455 by g.rodola: there is a small integer overflow bug
in _psutil_linux.c
https://code.google.com/p/psutil/issues/detail?id=455

It doesn't matter what the actual value of RLIM_INFINITY is as long as it
remains the same (as it is the case). I don't think this should be fixed.
Reply all
Reply to author
Forward
0 new messages