• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Funny crash in on Tiger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Funny crash in on Tiger
      • From: James Housley <email@hidden>
    • Re: Funny crash in on Tiger
      • From: Corbin Dunn <email@hidden>
References: 
 >Funny crash in on Tiger (From: James Housley <email@hidden>)

  • Prev by Date: Re: Funny crash in on Tiger
  • Next by Date: Re: Funny crash in on Tiger
  • Previous by thread: Re: Funny crash in on Tiger
  • Next by thread: Re: Funny crash in on Tiger
  • Index(es):
    • Date
    • Thread