• 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: Problem parsing file in 64 bit build.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem parsing file in 64 bit build.


  • Subject: Re: Problem parsing file in 64 bit build.
  • From: "Stephen J. Butler" <email@hidden>
  • Date: Mon, 07 May 2012 12:43:42 -0500

On Mon, May 7, 2012 at 8:06 AM, Charles Srstka <email@hidden> wrote:
> Myself, I like to just spin off a method or function that takes a chunk of data and populates the fields of the struct one by one, instead of writing the data straight onto the struct. A little more code, but you know it’s going to work right without any surprises.

Not only that, but writing structs to file handles has caused security
problems before. Consider what happens if you have a short or byte
field and the compiler pads the struct. Now there's memory in your
struct that never gets initialized. If you write that to a file or
socket you're sending whatever might have been lurking there.
Passwords, login details...

_______________________________________________

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: Problem parsing file in 64 bit build.
      • From: Graham Cox <email@hidden>
References: 
 >Problem parsing file in 64 bit build. (From: Graham Cox <email@hidden>)
 >Re: Problem parsing file in 64 bit build. (From: Quincey Morris <email@hidden>)
 >Re: Problem parsing file in 64 bit build. (From: Graham Cox <email@hidden>)
 >Re: Problem parsing file in 64 bit build. (From: Quincey Morris <email@hidden>)
 >Re: Problem parsing file in 64 bit build. (From: Charles Srstka <email@hidden>)

  • Prev by Date: iOS + and X buttons
  • Next by Date: Re: My app thinks it is a phone. Why?
  • Previous by thread: Re: Problem parsing file in 64 bit build.
  • Next by thread: Re: Problem parsing file in 64 bit build.
  • Index(es):
    • Date
    • Thread