]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR ada/79309
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Feb 2017 21:36:09 +0000 (21:36 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Feb 2017 21:36:09 +0000 (21:36 +0000)
* adaint.c (__gnat_killprocesstree): Use strlen instead of sizeof.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@245107 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/adaint.c

index e5fea3eefe086cd556bea7dc2d25f4f3ea3270ab..bff875a6822fd7746235fcfac9537ea92facc696 100644 (file)
@@ -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);