New issue
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
pack() treats non hex-digits with the "H*" template #16543
Comments
From thomas.lehmann@stueckseln.deCreated by thomas.lehmann@stueckseln.deThis is a bug report for perl from thomas.lehmann@stueckseln.de, ----------------------------------------------------------------- The `pack()` function can convert a string into its binary $ perl -e 'print(pack("H*", "6d6568") . "\n")' $ perl -e 'print(pack("H*", "6d6568goofed") . "\n")' $ perl -e 'print(pack("H*", "6d6568goofed") . "\n")' | hexdump -C It's obviously is stupidly calculating the ASCII char's values by using g => 00 There seems to be no validation/santitization being applied here. Expected: the function should fail/die in such a case or return undef. This behavior applies to multiple Perl (5) versions. Perl Info
|
From @iabynOn Wed, May 02, 2018 at 12:32:02PM -0700, Thomas Lehmann (via RT) wrote:
pack() is documented to use ord($char) % 16 for non-alphabetical However, given 'H's relaxed attitude to most chars, and long-standing -- |
The RT System itself - Status changed from 'new' to 'open' |
From @davidnicolGIGO. So what?
-- |
Migrated from rt.perl.org#133169 (status was 'open')
Searchable as RT133169$
The text was updated successfully, but these errors were encountered: