Commit 60ab8595 by Eric Botcazou

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
parent 372db67b
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment