Handling malloc failure

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Handling malloc failure

Heikki Linnakangas-5
Hi,

Many of the functions in __handles.c don't handle a NULL result from
malloc/calloc properly. There are if-checks for it, but then they go
ahead and reference the NULL pointer anyway. See attached patch.

- Heikki

_______________________________________________
unixODBC-dev mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev

fix-allochandle-oom-handling-1.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Handling malloc failure

Nick Gorham-2
On 24/03/14 19:37, Heikki Linnakangas wrote:
> Hi,
>
> Many of the functions in __handles.c don't handle a NULL result from
> malloc/calloc properly. There are if-checks for it, but then they go
> ahead and reference the NULL pointer anyway. See attached patch.
>
> - Heikki

Thanks, I will check this is ASAP.

--
Nick
_______________________________________________
unixODBC-dev mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev