We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I have run into an issue with the Net::IP::XS::print method when trying to use it with IPv6 subnet.
perl -MNet::IP::XS -e 'my $ip = new Net::IP::XS ("::1/128" ); print $ip->print . "\n"' 0��7V::1/128
After investigating I suspect a uninitialized buffer in the NI_print function. I modified it like this,
NI_print
diff --git a/object.c b/object.c index e967c61..fb47059 100644 --- a/object.c +++ b/object.c @@ -472,6 +472,7 @@ NI_print(SV *ipo, char *buf, int maxlen) const char *second_ip; int res; char mybuf[MAX_IPV6_STR_LEN]; + mybuf[0] = '\0'; is_prefix = NI_hv_get_iv(ipo, "is_prefix", 9);
and it seems to work after that.
I'll happy to open a pull request to fix the issue if you want.
Thanks, Gaël
The text was updated successfully, but these errors were encountered:
ad34341
Thanks, this fix has now been applied. 0.22 has been uploaded to CPAN and should be available shortly.
Sorry, something went wrong.
No branches or pull requests
Hello,
I have run into an issue with the Net::IP::XS::print method when trying to use it with IPv6 subnet.
perl -MNet::IP::XS -e 'my $ip = new Net::IP::XS ("::1/128" ); print $ip->print . "\n"' 0��7V::1/128
After investigating I suspect a uninitialized buffer in the
NI_print
function. I modified it like this,and it seems to work after that.
I'll happy to open a pull request to fix the issue if you want.
Thanks,
Gaël
The text was updated successfully, but these errors were encountered: