Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Data-UUID CPAN distribution.

Report information
The Basics
Id: 39717
Status: resolved
Priority: 0/
Queue: Data-UUID

People
Owner: Nobody in particular
Requestors: RUZ [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.148
Fixed in: (no value)



Subject: [PATCH] switch from custom md5 implementation to Digest::MD5
Custom MD5 (based on sample from RFC) implementation used in the module works wrong on 64bit machines what causes a lot of collisions in UUIDs generated using a namespace. Please, consider attached patch that: * deletes md5.{h,c} files * adds a test that demonstrate problem on affected archs * uses Digest::MD5 to generate v3 UUIDs -- Best regards, Ruslan.
Subject: Data-UUID-1.148-replace_rfc_md5_implementation_with_digest_md5.patch

Message body is not shown because it is too large.

applied in git, will make dev release -- rjbs
Here is patch to fix issue with n_a undeclared. commit message in the patch. On Sat Nov 01 23:19:00 2008, RJBS wrote: Show quoted text
> applied in git, will make dev release
-- Best regards, Ruslan.
Use POPs+SvPV instead of POPpx which may have problems in perl versions. New code should be more compatible. diff -ru Data-UUID-1.200_01/UUID.xs Data-UUID-1.200_01-my/UUID.xs --- Data-UUID-1.200_01/UUID.xs 2008-11-02 06:16:56.000000000 +0300 +++ Data-UUID-1.200_01-my/UUID.xs 2008-11-11 23:33:02.000000000 +0300 @@ -271,6 +271,8 @@ static void MD5Final( unsigned char hash[16], SV* ctx ) { int rcount; char* tmp; + STRLEN len; + SV* retval; dSP; ENTER; SAVETMPS; @@ -285,7 +287,12 @@ if ( rcount != 1 ) croak("Digest::MD5->digest hasn't returned a scalar"); - memcpy(hash, POPpx, 16); + retval = POPs; + tmp = SvPV(retval, len); + if ( len != 16 ) + croak("Digest::MD5->digest returned not 16 bytes"); + + memcpy(hash, tmp, len); PUTBACK; FREETMPS;