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
$ perl -MData::UUID -e' my $x = "12345678901234567890123456789012"; print Data::UUID->new->from_string($x), "\n"; $x = 4; print Data::UUID->new->from_string($x), "\n"; print "done\n"; ' xV4▒V4x▒4Vx▒ xV4▒V4x▒4Vx▒ done
That's wrong. If I change C<< $x = 4; >> to C<< undef $x; $x = 4; >>, an error is correctly reported.
xV4▒V4x▒4Vx▒ from_string(4) failed...
The text was updated successfully, but these errors were encountered:
Better test case:
$ perl -Mlib=lib,thirdParty/lib/perl5 -MData::UUID -e' my $x = "3\0" x 16; print Data::UUID->new->from_string($x), "\n"; print "done\n"; ' done
Sorry, something went wrong.
Fix:
void from_string(self,str) uuid_context_t *self; - char *str; + SV *str_sv; ALIAS: Data::UUID::from_hexstring = F_HEX Data::UUID::from_b64string = F_B64 PREINIT: + STRLEN len; + char *str = SvPV(str_sv, len); perl_uuid_t uuid; char *from, *to; int c; unsigned int i; unsigned char buf[4]; PPCODE: switch(ix) { case F_BIN: case F_STR: case F_HEX: + if (len != sizeof(perl_uuid_t)*2) + croak("from_string(%s) failed...\n", str);
Untested
Oops, that "fix" only fixes the first code sample, but not the second. Unfortunately, I've already spent too much time on this today.
No branches or pull requests
That's wrong. If I change C<< $x = 4; >> to C<< undef $x; $x = 4; >>, an error is correctly reported.
The text was updated successfully, but these errors were encountered: