Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Matts (1087)

Matts
  (email not shown publicly)

I work for MessageLabs [messagelabs.com] in Toronto, ON, Canada. I write spam filters, MTA software, high performance network software, string matching algorithms, and other cool stuff mostly in Perl and C.

Journal of Matts (1087)

Friday July 07, 2006
09:04 AM

The fun of a dumb implementation

[ #30204 ]

Last night I was helping pudge fix his Mac::* modules to work on OSX/Intel. One of the tests he got me to do was to create a calendar entry next week and switch focus to iCal.

Only the bug was in endian conversion of a number, so instead of getting a date (as epoch seconds) next week, we got one back as epoch seconds in about 10,000 years from now.

iCal kindly obliged, only it did so dumbly - seemingly creating memory space for all the dates from now until 10,000 years in the future. Used up all my ram. Crashed iCal, knocked me off the net, had to restart Mail.app and Safari too to recover some memory.

What fun. (I see the bug is now fixed and on CPAN).

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • that's quite the crash.

    Wait, does that mean there's a DoS attack built into iCal, if you import somebody's badly formatted .ics file? (I say this with minimal knowlege, not having used ical much).
    --

    -DA [coder.com]

    • Probably.
      • Maybe, I don't know. I did some more testing on this (trying to put a little-endian date into my big-endian iCal), and I observed the same behavior, except it was a bit inconsistent in how it failed.

        However, I was wrong about it being tens of thousands of years. It was probably more like tens of billions. With a b. What I was misremembering is that the new 64-bit time can go to about 500 billion years, but the OS is at present designed to go out to only 30,000.
  • Sounds like you fixed the bug, so at least the story has a happy endian.