From 1a6d2f2ff64b0e66af70b192e4e228a0ef55e443 Mon Sep 17 00:00:00 2001 From: Pierre Muller Date: Wed, 25 Mar 2009 10:02:13 +0000 Subject: [PATCH] ARI fix: "strlen d_name" rule. * linux-nat.c (linux_nat_xfer_osdata): Use NAMELEN macro. --- gdb/ChangeLog | 6 ++++++ gdb/linux-nat.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5c626c12c46..bbeaff93e19 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2009-03-25 Pierre Muller + + ARI fix: "strlen d_name" rule. + * linux-nat.c (linux_nat_xfer_osdata): Use NAMELEN macro. + + 2009-03-24 Tom Tromey Pedro Alves diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 3cfc2b22280..be99ecea9b4 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -4163,7 +4163,7 @@ linux_nat_xfer_osdata (struct target_ops *ops, enum target_object object, char procentry[sizeof ("/proc/4294967295")]; if (!isdigit (dp->d_name[0]) - || strlen (dp->d_name) > sizeof ("4294967295") - 1) + || NAMELEN (dp) > sizeof ("4294967295") - 1) continue; sprintf (procentry, "/proc/%s", dp->d_name); -- 2.30.2