Bug 269582 - dns/ddclient: Use of uninitialized value $2 in concatenation (.) or string at /usr/local/lib/perl5/site_perl/IO/Socket/SSL.pm line 792.
Summary: dns/ddclient: Use of uninitialized value $2 in concatenation (.) or string at...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-16 12:15 UTC by Gerard Seibert
Modified: 2023-02-19 11:51 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (mjl)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gerard Seibert 2023-02-16 12:15:19 UTC
FreeBSD.1-RELEASE-p6 GENERIC amd64

After a recent update, I began noticing the following message in the daily run output:

Forcing ddclient update:
Use of uninitialized value $2 in concatenation (.) or string at /usr/local/lib/perl5/site_perl/IO/Socket/SSL.pm line 792.

All of the UPDATES do succeed, though.

I am not sure if the problem is with "dns/ddclient" or "security/p5-IO-Socket-SSL"
Comment 1 mjl 2023-02-16 21:23:46 UTC
Hi Gerard,

My hunch is that this is an issue with IO-Socket-SSL: the code changed in that library recently:

https://metacpan.org/release/SULLR/IO-Socket-SSL-2.078/diff/SULLR%2FIO-Socket-SSL-2.079/lib/IO/Socket/SSL.pm

The issue is that $2 might be uninitialized -- and my reading of the code is that that maps to port value (the comment even indicates the port value is optional) but it looks like they concatenate $2 anyway.

Can you please open an issue on the github repo?
https://github.com/noxxi/p5-io-socket-ssl

Matthew
Comment 2 Gerard Seibert 2023-02-17 10:50:20 UTC
(In reply to mjl from comment #1)
I posted the problem as you suggested and received this response.

From: Steffen Ullrich <notifications@github.com>

This is likely because some -w command line is applying use warnings to all of the modules included in ddclient instead of letting each module decide by its own if warnings should be applied or not.

The fix was created:
https://github.com/noxxi/p5-io-socket-ssl/commit/8509e26946220c225f5adf7668f1320b617b748b
Comment 3 Sergei Vyshenski 2023-02-17 11:26:53 UTC
(In reply to mjl from comment #1)

Hi,

1) We are talking about a warning, not about an error, correct?

2) I could see nothing wrong in the code which Matthew mentions:

		    $host =~s{^
			(?:
			    ([^:\[]+) |    # ipv4|host
			    (\[(.*)\])     # [ipv6|host]
			)
			(:[\w\-]+)?        # optional :port
		    $}{$1$2}x;             # ipv4|host|ipv6

3) This version 2.079 of IO-Socket-SSL has been ported a month ago, and two more versions ported since then. Does this correlate with things that went wrong "recently"?

4) 4 hours ago upstream has disabled warnings on uninitialized values:
https://github.com/noxxi/p5-io-socket-ssl/blame/master/lib/IO/Socket/SSL.pm

Can we consider the case closed, or should I revert port p5-IO-Socket-SSL from 
2.081 to 2.078?

Regards, Sergei
Comment 4 Gerard Seibert 2023-02-17 15:06:53 UTC
(In reply to Sergei Vyshenski from comment #3)
I don't feel there is any overriding reason to revert to an older version. Upstream has corrected the problem and closed the issue.
Comment 5 mjl 2023-02-19 07:38:17 UTC
The only comment I would make is that the IO-Socket-SSL maintainer might consider adding this patch to their port.  Gerard, can you please flag that this bug report can be closed.