Re: Funny crash in on Tiger
Re: Funny crash in on Tiger
- Subject: Re: Funny crash in on Tiger
- From: glenn andreas <email@hidden>
- Date: Mon, 27 Jun 2005 14:58:56 -0500
On Jun 27, 2005, at 2:18 PM, James Housley wrote:
unsigned char out[MD5_DIGEST_LENGTH+1];
for (x = 0; x < 48; x++) out[x] = '\0';
According to the header in /usr/include/CommonCrypto/CommonDigest.h:
/usr/include/CommonCrypto/CommonDigest.h:#define
CC_MD5_DIGEST_LENGTH 16 /* digest length in
bytes */
/usr/include/CommonCrypto/CommonDigest.h:#define
MD5_DIGEST_LENGTH CC_MD5_DIGEST_LENGTH
So you declare an array with 17 bytes, and then set 48 bytes of it to
0, overwriting parts of your stack.
Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
Widgetarium | the quickest path to widgets
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden