Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.2:Ports
2ping
2ping-fix-use-of-uninitialized-warning.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2ping-fix-use-of-uninitialized-warning.patch of Package 2ping
From c6753e03927cc5f065e3da6a6f735a1691146dd8 Mon Sep 17 00:00:00 2001 From: Jiri Slaby <jirislaby@gmail.com> Date: Sat, 4 Apr 2015 12:54:27 +0200 Subject: [PATCH] 2ping: fix 'use of uninitialized' warning With 2ping --listen -6, I see Use of uninitialized value $opt_intaddr in pattern match (m//) at /usr/bin/2ping line 356. Check for undef, as there might be one pushed to the array. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> --- script/2ping.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/script/2ping.in b/script/2ping.in index 24c00b95ec2f..ff117f9b0fd4 100755 --- a/script/2ping.in +++ b/script/2ping.in @@ -350,7 +350,8 @@ if($opt_listen) { foreach my $opt_intaddr (@working_opt_intaddrs) { my($sock); my($is_ipv6) = $opt_ipv6; - if($opt_ipv6 && $opt_intaddr =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) { + if($opt_ipv6 && defined $opt_intaddr && + $opt_intaddr =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) { $is_ipv6 = 0; } my $sockerr = ''; -- 2.3.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor