Safari and nil

Fire up Safari, go to %00.com. Depending on the device you are on, you should get a variant of this message:

safari

This seems specific to Safari. No big deal, just found it interesting. Robert Davey sent this my way.

Anyone know why this is happening?



8 thoughts on “Safari and nil”

  1. Me too, this ones been getting through quite a bit. When I tried to report it to Disqus I couldn’t because it didn’t seem to recognize the date stamp.

  2. The fact that it’s reporting this error and not crashing seems positive, but the fact that it’s a memory allocation error hints that it is resolving %00 to nil and causing a memory allocation error. I’ve not seen it happen for any other percent encoded letters. It seems to happen if %00 appears anywhere within the domain part of the URL. Path / query don’t seem to be affected.
    A parse error of percent encoding in Chrome is being used for games at the moment! 🙂 https://github.com/szhu/3030/tree/master

  3. Underneath Objective-C is C, and C strings are null terminated. It’s probably detecting the null character and refusing to allocate the string for that reason.

Leave a Reply

Your email address will not be published. Required fields are marked *