Where to store levels so i can release new packs.

Member
Posts: 153
Joined: 2004.12
Post: #16
Steven Wrote:A buffer overflow happens when your program reads an unexpectedly large data structure in. Think it of trying to fit a 512 character string into a char[128]. There are only 128 bytes of memory allocated, so if you try to write any more you will write into an undefined area (at best crashing your application, medium-bad causing unexpected behavior, and at worst allowing random code execution)

Basically, make sure anything that reads user input into a fixed-size buffer has some sort of check to make sure you don't hit the end of it. (And if you're using C strings, leave space for the null!)

This probably isn't an issue if you use exclusively AppKit/Foundation, as I'm sure Apple has audited it fairly well...

Thanks for the info. It seems like I would have to worry about this anytime. Why is it only an issue when im storing in /Users/Shared?

There was a long silence...
'I claim them all,' said the Savage at last.
Quote this message in a reply
Member
Posts: 370
Joined: 2002.04
Post: #17
It's not, I was just pointing it out because you'll be storing data in a world-writable area that will be used by administrative users.

Did you ever wonder why we had to run for shelter when the promise of a brave new world unfurled beneath the clear blue sky?
Quote this message in a reply
Member
Posts: 153
Joined: 2004.12
Post: #18
Oh...

So your worried that someone might install a file into that location that will overload the user's memory buffer through my parser? Be it a hacker or just some kid trying to make their own level...?

Sorry to ask for so many clarifications. This is all new to me.

There was a long silence...
'I claim them all,' said the Savage at last.
Quote this message in a reply
Post Reply