Firefox also occasionally has problems for me, but not nearly as often as Safari.
It is misleading to say the problem is with the .gif file. This problem originated with the release of Tiger (OSX 10.4). And any decent browser ought to be able to recover gracefully from bad .gif file rather than crashing uncontrollably. This still has to be considered a Safari bug, and Apple has work to do. I have reported this problem several times. Have you?