From: Dmitry V. Levin Date: Fri, 29 Jul 2016 17:10:50 +0000 (+0000) Subject: startup_attach: do not use atoi X-Git-Tag: v4.14~240 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bbfeea269e07acbea973e22d9ea5f4dcb5f34948;p=strace startup_attach: do not use atoi * strace.c (startup_attach): Replace atoi with string_to_uint. --- diff --git a/strace.c b/strace.c index ab4867f6..6c320bfe 100644 --- a/strace.c +++ b/strace.c @@ -1078,8 +1078,7 @@ startup_attach(void) if (de->d_fileno == 0) continue; - /* we trust /proc filesystem */ - tid = atoi(de->d_name); + tid = string_to_uint(de->d_name); if (tid <= 0) continue; ++ntid;