• 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: archiving report
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: archiving report


  • Subject: Re: archiving report
  • From: Ben Kennedy <email@hidden>
  • Date: Tue, 26 Feb 2013 23:03:16 -0800

On 26 Feb 2013, at 4:20 pm, Graham Cox wrote:

> I would hesitate to suggest it, but if you are routinely storing NSNull (or @"$null") in arrays, it might point to a flaw in your own design.

As someone pointed out earlier, this bug makes NSKeyedArchiver unusable for any data model that contains user-entered strings.  For round-trip behaviour, *all* NSString values passed through NSKeyedArchiver must be filtered on the way in and on the way out.

Sure enough, I just discovered that one of my apps--whose file format is about eight years old and (perhaps unfortunately) based around NSKeyedArchiver--is vulnerable to this bug.  Enter the string "$null" into any text field in the doc, save, and that doc will never open again.  (Clearly this points to another bug in my own code--an exception is raised due to a nil string being assigned to an NSTextFieldCell--but proves that the magic string "$null" has been turned into nothingness.)

b

--
Ben Kennedy, chief magician
Zygoat Creative Technical Services
http://www.zygoat.ca


_______________________________________________

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: 
 >archiving report (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: archiving report (From: Gwynne Raskind <email@hidden>)
 >Re: archiving report (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: archiving report (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Issue of NSStatusBar
  • Next by Date: customizing cursor nssearchfield
  • Previous by thread: Re: archiving report
  • Next by thread: Re: archiving report
  • Index(es):
    • Date
    • Thread