• 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
[OT] Re: strncat on Leopard vs. Snow Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[OT] Re: strncat on Leopard vs. Snow Leopard


  • Subject: [OT] Re: strncat on Leopard vs. Snow Leopard
  • From: Alastair Houghton <email@hidden>
  • Date: Sat, 29 Aug 2009 12:36:46 +0100

On 29 Aug 2009, at 06:43, David Riggle wrote:

When I compile my app on Snow Leopard and run it on Leopard, strncat erroneously aborts with "detected buffer overflow".

How is this a Cocoa question? (Hint: it isn't, so you've sent your question to the wrong mailing list.)


I think there was a bug in the Leopard version of strncat that was fixed in the Snow Leopard version.

http://www.opensource.apple.com/source/Libc/Libc-498/secure/strncat_chk.c
http://www.opensource.apple.com/source/Libc/Libc-583/secure/strncat_chk.c

(note the removed dstlen++)


Since it's a relatively simple problem, however, a workaround might be to make your destination buffer one character larger?

Kind regards,

Alastair.

--
http://alastairs-place.net



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >strncat on Leopard vs. Snow Leopard (From: David Riggle <email@hidden>)

  • Prev by Date: Re: Get error message about registered observers when Object receives dealloc message
  • Next by Date: [OT] Re: llvm-gcc-4.2 link-time error seen from command line but not in Xcode 3.2
  • Previous by thread: strncat on Leopard vs. Snow Leopard
  • Next by thread: NSCoder Chicag Reminder - Monday Night
  • Index(es):
    • Date
    • Thread