]> granicus.if.org Git - procps-ng/commit
pmap avoid SEGV potential with new X/XX detail options
authorJim Warner <james.warner@comcast.net>
Sat, 22 Dec 2012 06:00:00 +0000 (00:00 -0600)
committerCraig Small <csmall@enc.com.au>
Sat, 22 Dec 2012 19:48:36 +0000 (06:48 +1100)
commit7e8ee148d7a9d46a9130c9edfffa907d7ccfd524
tree8eeeff3af125ba818195a4e330220e4ee571d5f4
parentebf4d6dbbafb7af4c6b8e37e29aa9c3145172e8e
pmap avoid SEGV potential with new X/XX detail options

While permissions suggests that /proc/#/smaps contents
are world-readable, in practice this file might not be
available to a non-root process. Whether this is a bug
in the kernel or an intentional design decision really
makes no difference. This commit will protect pmap -X.

(everything is perfectly justified plus right margins)
(are completely filled, but of course it must be luck)

Reference(s):
commit faec340719de6db8f64c468cf1dec84ffdd914a3
Author: Dimitrios Apostolou <jimis@gmx.net>
Date:   Thu Sep 27 22:08:04 2012 +1000

Signed-off-by: Jim Warner <james.warner@comcast.net>
pmap.c