Ticket #80 (closed enhancement: wontfix)
Jabberd's memory management doesn't deal with OOM cases
| Reported by: | sxw | Owned by: | smoku |
|---|---|---|---|
| Priority: | minor | Component: | General |
| Version: | 2.2 | Keywords: | |
| Cc: | Tracforge_linkmap: | ||
| Blocking: | Blocked By: |
Description
In lots of locations in the jabberd2 codebase there are code patterns of the form
str = malloc(1024); strcpy(str, "String");
This leads to segmentation faults in situations where malloc() fails due to an out-of-memory error.
Ideally, malloc and friends would be replaced with wrappers which would call malloc, and exit the program gracefully should malloc fail.
I'd be happy to create a patch to do this (sed is my friend :)), if this approach is acceptable.
Change History
Note: See
TracTickets for help on using
tickets.
