Re: [Arsperl-users] ars_CreateEntry crashing on Windows
Brought to you by:
jeffmurphy
|
From: Jeff M. <jcm...@je...> - 2007-07-20 19:41:42
|
John Unsworth wrote:
> Hello,
>
> Can someone explain what happens now? Do we get notified of an official fix?
>
I added this patch to the CVS tree. Since the discussion centered around
the bug affecting Windows, I modified the suggested fix to be:
> /* malloc that will never return null */
> void *
> mallocnn(int s)
> {
>
> #if defined(malloc) && defined(_WIN32)
> #undef malloc
> #endif
>
> void *m = malloc(s ? s : 1);
>
> if (!m)
> croak("can't malloc");
>
> memset(m, 0, s ? s : 1);
>
> return m;
> }
>
|