|Summary:||ASTERISK-01779: MD5 portability to 64-bit|
|Date Opened:||2004-06-07 21:39:31||Date Closed:||2011-06-07 14:10:30|
|Environment:||Attachments:||( 0) md5_diff|
|Description:||The md5.h header file incorrectly defines the uint32 data type for many 64-bit platforms. As a consequence, the md5.c code does not correctly perform shift operations, which prevents asterisk from running. A proposed fix is included below.|
Tested on: Suse Linux 9.0 64-bit (Dual AMD Opterons)
****** ADDITIONAL INFORMATION ******
*** THIS CODE FIXES PROBLEM IN MD5.H ON 64-BIT PLATFORMS ***
#if ULONG_MAX == 0xffffffff
typedef long int32;
typedef unsigned long uint32;
#elif UINT_MAX == 0xffffffff
typedef int int32;
typedef unsigned int uint32;
# error defaults not correct; you must hand modify code
|Comments:||By: Brian West (bkw918) 2004-06-07 22:11:00|
attach a diff -u and this is FAR from major
By: garakelian (garakelian) 2004-06-07 22:18:17
I'll attach a diff file per your request. As far as categorizing the bug, you can use
whatever subjective description you want in your database.
By: Mark Spencer (markster) 2004-06-08 16:52:25
This patch didn't apply to cvs head. am i missing something?
By: garakelian (garakelian) 2004-06-08 16:57:07
The diff file was relative to the "stable" version of include/asterisk/md5.h. Should it have been relative to the current version?
By: Mark Spencer (markster) 2004-06-08 17:01:15
yes, against cvs head please.
By: zoa (zoa) 2004-06-08 19:15:28
as far as i know, the md5.c problem was already fixed, i reported it a while ago, together with a fix.
please test cvs-head before attempting to make a patch.
By: garakelian (garakelian) 2004-06-08 19:43:21
Thanks for info, zoa.
I downloaded/compiled the current version but there was a compile error, so I went with the stable version, for my 64-bit platform.
The stable version compiled fine, but as you said, did not function -- mine in fact would not load, because the loader.c program could not verify a signature in some of the modules.
Since the md5.c/md5.h files appear to have been fixed in the current version, please close this bug.