diff options
author | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2017-02-01 21:36:09 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2017-02-01 21:36:09 +0000 |
commit | 60ab85958c4a6ae86ef8d8675a0fbe348602357b (patch) | |
tree | fa55eb1a47f0aaa7d63d10e15b84f3c733c03be5 | |
parent | 372db67b4de04e6fe86a44fdad34c7d0ec14fe6a (diff) | |
download | gcc-60ab85958c4a6ae86ef8d8675a0fbe348602357b.zip gcc-60ab85958c4a6ae86ef8d8675a0fbe348602357b.tar.gz gcc-60ab85958c4a6ae86ef8d8675a0fbe348602357b.tar.bz2 |
re PR ada/79309 (incorrectly bounded calls to strncat in adaint.c)
PR ada/79309
* adaint.c (__gnat_killprocesstree): Use strlen instead of sizeof.
From-SVN: r245107
-rw-r--r-- | gcc/ada/adaint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index e5fea3e..bff875a 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -3401,7 +3401,7 @@ void __gnat_killprocesstree (int pid, int sig_num) /* read /proc/<PID>/stat */ - if (strlen (d->d_name) >= sizeof (statfile) - sizeof ("/proc//stat")) + if (strlen (d->d_name) >= sizeof (statfile) - strlen ("/proc//stat")) continue; strcpy (statfile, "/proc/"); strcat (statfile, d->d_name); |