Re: Length of NSWindow's stringWithSavedFrame result?
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