Projects
Eulaceura:Factory
procps-ng
_service:obs_scm:openeuler-top-exit-with-error-...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:openeuler-top-exit-with-error-when-pid-overflow.patch of Package procps-ng
From 68bd42fb10cfaf278e841d2925da7f061820abd4 Mon Sep 17 00:00:00 2001 From: xuchunmei <xuchunmei@huawei.com> Date: Wed, 23 Jan 2019 07:57:53 -0500 Subject: [PATCH] top: exit with error when pid overflow Signed-off-by: xuchunmei <xuchunmei@huawei.com> Signed-off-by: Qiang Wei <qiang.wei@suse.com> --- top/top.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/src/top/top.c +++ b/src/top/top.c @@ -4338,7 +4338,8 @@ static void parse_args (int argc, char * if (Monpidsidx >= MONPIDMAX) error_exit(fmtmk(N_fmt(LIMIT_exceed_fmt), MONPIDMAX)); if (1 != sscanf(cp, "%d", &pid) - || strpbrk(cp, "+-.")) + || strpbrk(cp, "+-.") + || 0 > pid) error_exit(fmtmk(N_fmt(BAD_mon_pids_fmt), cp)); if (!pid) pid = getpid(); for (i = 0; i < Monpidsidx; i++)
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2