• 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: Length of NSWindow's stringWithSavedFrame result?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Length of NSWindow's stringWithSavedFrame result?


  • Subject: Re: Length of NSWindow's stringWithSavedFrame result?
  • From: Graham Cox <email@hidden>
  • Date: Tue, 08 Mar 2011 19:39:33 +1100

On 08/03/2011, at 4:38 PM, John Bartleson wrote:

> I'm suspicious, though, that the 50 bytes I've allowed for the
> string returned by getxattr in the second method above might not be enough on a multi-monitor
> system.


You could just make it bigger - it's a very transient piece of memory on the stack (or, if that's a problem, just malloc and free a chunk). Since getxattr allows you to pass in the max size of the buffer, it's also safe from a buffer overflow attack.

--Graham


_______________________________________________

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:
    • Re: Length of NSWindow's stringWithSavedFrame result?
      • From: John Bartleson <email@hidden>
References: 
 >Length of NSWindow's stringWithSavedFrame result? (From: John Bartleson <email@hidden>)

  • Prev by Date: Re: How to wait for methods with result/completion blocks to finish?
  • Next by Date: Re: Event Tap(CFMachPortRef) problem for Hot Key- callback is not invoked
  • Previous by thread: Length of NSWindow's stringWithSavedFrame result?
  • Next by thread: Re: Length of NSWindow's stringWithSavedFrame result?
  • Index(es):
    • Date
    • Thread