This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] ARI fix: linux-nat.c: remove strlen d_name
- From: "Pierre Muller" <muller at ics dot u-strasbg dot fr>
- To: <gdb-patches at sourceware dot org>
- Date: Tue, 24 Mar 2009 01:00:48 +0100
- Subject: [RFA] ARI fix: linux-nat.c: remove strlen d_name
Here also, I could have used the obvious rule,
but I am still not really sure about the
ChangeLog entry.
I was unable to find the proper way to tag
a ChangeLog entry for Awk Regression Index.
Does anyone remember?
Is this OK to commit?
Pierre Muller
Pascal language support maintainer for GDB
ChangeLog entry:
2009-03-24 Pierre Muller <muller@ics.u-strasbg.fr>
ARI fix: "strlen d_name" rule.
* linux-nat.c (linux_nat_xfer_osdata): Use NAMELEN macro.
$ cvs diff -up linux-nat.c
Index: linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/linux-nat.c,v
retrieving revision 1.125
diff -u -p -r1.125 linux-nat.c
--- linux-nat.c 18 Mar 2009 16:47:45 -0000 1.125
+++ linux-nat.c 23 Mar 2009 23:44:14 -0000
@@ -4163,7 +4163,7 @@ linux_nat_xfer_osdata (struct target_ops
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);