projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
372db67
)
re PR ada/79309 (incorrectly bounded calls to strncat in adaint.c)
author
Eric Botcazou
<ebotcazou@gcc.gnu.org>
Wed, 1 Feb 2017 21:36:09 +0000
(21:36 +0000)
committer
Eric Botcazou
<ebotcazou@gcc.gnu.org>
Wed, 1 Feb 2017 21:36:09 +0000
(21:36 +0000)
PR ada/79309
* adaint.c (__gnat_killprocesstree): Use strlen instead of sizeof.
From-SVN: r245107
gcc/ada/adaint.c
patch
|
blob
|
history
diff --git
a/gcc/ada/adaint.c
b/gcc/ada/adaint.c
index e5fea3eefe086cd556bea7dc2d25f4f3ea3270ab..bff875a6822fd7746235fcfac9537ea92facc696 100644
(file)
--- 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) - s
izeof
("/proc//stat"))
+ if (strlen (d->d_name) >= sizeof (statfile) - s
trlen
("/proc//stat"))
continue;
strcpy (statfile, "/proc/");
strcat (statfile, d->d_name);