Projects
Eulaceura:Mainline
iputils
_service:obs_scm:backport-ping-fix-overflow-on-...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:backport-ping-fix-overflow-on-negative.patch of Package iputils
From 2a63b94313352ed62f47adbc1a0d33bfea7ca188 Mon Sep 17 00:00:00 2001 From: Petr Vorel <pvorel@suse.cz> Date: Wed, 17 May 2023 00:57:24 +0200 Subject: [PATCH] ping: Fix overflow on negative -i Restore back check for -i <= 0. Fixes: 918e824 ("ping: add support for sub-second timeouts") Closes: https://github.com/iputils/iputils/issues/465 Signed-off-by: Petr Vorel <pvorel@suse.cz> --- ping/ping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ping/ping.c b/ping/ping.c index 8f442037..27c72cad 100644 --- a/ping/ping.c +++ b/ping/ping.c @@ -436,7 +436,7 @@ main(int argc, char **argv) double optval; optval = ping_strtod(optarg, _("bad timing interval")); - if (isgreater(optval, (double)INT_MAX / 1000)) + if (islessequal(optval, 0) || isgreater(optval, (double)INT_MAX / 1000)) error(2, 0, _("bad timing interval: %s"), optarg); rts.interval = (int)(optval * 1000); rts.opt_interval = 1;
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