OFFTOPIC : Re: [SDL] segmentation fault

Thomas Krennwallner djmaecki at ull.at
Wed Feb 26 03:08:05 PST 2003


On Wed Feb 26, 2003 at 11:55:00AM +0100, the boisterous
Julien Pauty <jpauty at irisa.fr>
wrote to me:
>     char * buffer = malloc(1000000);
>     if (buffer == NULL)
>     {
>       perror ("Error");
>       *buffer = 2;
>     }

You are trying to access a buffer which points to NULL. This has nothing
to do with your memory leak. It's obvious that this is a nogo.

so long
Thomas

-- 
  ___    Obviously we do not want to leave zombies around.
_/___\     - W. Richard Stevens
 ( ^ >   Thomas Krennwallner <djmaecki at ull dot at>
 /   \   1024D/67A1DA7B 9484 D99D 2E1E 4E02 5446  DAD9 FF58 4E59 67A1 DA7B
(__\/_)_ http://bigfish.ull.at/~djmaecki/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20030226/c7dc8d70/attachment.pgp>


More information about the SDL mailing list