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

strncat on Leopard vs. Snow Leopard


  • Subject: strncat on Leopard vs. Snow Leopard
  • From: David Riggle <email@hidden>
  • Date: Fri, 28 Aug 2009 22:43:49 -0700

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

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++)

And it looks like there was another bug in the Leopard _string.h that prevented the buggy strncat from being called if you compiled on Leopard. Not so if you compile on Snow Leopard. If you do and run on Leopard, the buggy strncat gets called and blows a gasket. That's my theory anyway.

Anybody know how I can bring the two big cats to an understanding on strncat? If not, I'll use my own implementation, though it kinda sucks to have a broken libc.

Dave

_______________________________________________

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


  • Follow-Ups:
    • [OT] Re: strncat on Leopard vs. Snow Leopard
      • From: Alastair Houghton <email@hidden>
  • Prev by Date: Setting default button to Window containing box.
  • Next by Date: Re: core-data app design question
  • Previous by thread: Re: Setting default button to Window containing box.
  • Next by thread: [OT] Re: strncat on Leopard vs. Snow Leopard
  • Index(es):
    • Date
    • Thread