Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux - process exe improper null bytes handling #466

Closed
giampaolo opened this issue May 23, 2014 · 2 comments
Closed

Linux - process exe improper null bytes handling #466

giampaolo opened this issue May 23, 2014 · 2 comments

Comments

@giampaolo
Copy link
Owner

From [email protected] on January 23, 2014 13:20:17

Split on first null character and return 1st item from list. It fixes issues such as 

>>> os.readlink("/proc/%s/exe" % 4672)
'/usr/sbin/hald\x00r\x00\x9f$+\x00\x00\xd0\x8f\xca\x9f$+\x00\x00p (deleted)'
>>> os.readlink("/proc/%s/exe" % 4672).split('\x00')[0]
'/usr/sbin/hald'
>>>

Attachment: _pslinux.py.patch

Original issue: http://code.google.com/p/psutil/issues/detail?id=466

@giampaolo
Copy link
Owner Author

From g.rodola on February 08, 2014 11:05:59

Fixed in revision be986f2c2867 . Thanks for the patch.

Summary: Linux - process exe improper null bytes handling (was: Patch for /psutil/_pslinux.py)
Status: FixedInHG
Labels: -Type-Patch Type-Defect OpSys-Linux Milestone-2.0.0

@giampaolo
Copy link
Owner Author

From g.rodola on March 10, 2014 04:36:50

Closing out as fixed as 2.0.0 version is finally out.

Status: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant