#80: Jabberd's memory management doesn't deal with OOM cases
-------------------+--------------------------------------------------------
Reporter:  sxw     |       Owner:  smoku  
    Type:  defect  |      Status:  new    
Priority:  major   |   Component:  General
 Version:  2.1     |    Blocking:         
-------------------+--------------------------------------------------------
 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.

-- 
Ticket URL: <http://jabberd2.xiaoka.com/ticket/80>
jabberd2 <http://jabberd2.xiaoka.com/>
jabberd2 project
_______________________________________________
jabberd2 mailing list
[email protected]
http://lists.xiaoka.com/listinfo.cgi/jabberd2-xiaoka.com

Reply via email to