Skip Menu |

This queue is for tickets about the Digest-DJB CPAN distribution.

Report information
The Basics
Id: 46215
Status: new
Priority: 0/
Queue: Digest-DJB

People
Owner: Nobody in particular
Requestors: dharris [...] drh.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.00
Fixed in: (no value)



Subject: Incorrect results with NULL characters in strings
Digest::DJB::djb uses a NULL character ("\x00") as a string-terminator. Perl allows NULL's in strings, so a NULL should not signal end-of-string. Example program: Show quoted text
>>>
use strict; use Digest::DJB qw(); print Digest::DJB::djb("hi") . "\n"; print Digest::DJB::djb("hi\x00") . "\n"; print Digest::DJB::djb("hi\x00\x00") . "\n"; <<< Output: Show quoted text
>>>
5863446 5863446 5863446 <<< Expected output: * different hash values for each string