Summary: | ASTERISK-07690: [patch] advanced_options frees memory then uses and modifies it later in the routine. | ||
Reporter: | Max Mutrux (rmaxm) | Labels: | |
Date Opened: | 2006-09-07 16:27:15 | Date Closed: | 2011-06-07 14:08:09 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Applications/app_voicemail |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) advanced_options-trunk-r42244.patch | |
Description: | advanced_options calls ast_config_destroy() then calls play_message_datetime and play_message_callerid with retrieved values which are now in free'd memory. play_message_callerid calls ast_callerid_parse which will drop may drop a zero into memory that's been allocated for another purpose. ****** ADDITIONAL INFORMATION ****** This bug appears to be introduced in 1.2.10 to keep advanced_options from leaking memory. I "yuck:" fixed the bug even though goto's are against my belief system. It seems that the "yuck:" is really common in the code, so who am I to argue. | ||
Comments: | By: Max Mutrux (rmaxm) 2006-09-07 16:31:54 Just noticed that someone uploaded a patch to solve this same problem... Sorry. But the other patch (0007618, 09-06-06) has a bug, you'll need to replace: if (res) ast_config_destroy(msg_cfg); return 9; with: if (res) { ast_config_destroy(msg_cfg); return 9; } In the two places where it occurs. By: Joshua C. Colp (jcolp) 2006-09-07 20:55:17 I'm going to go for 7618, but thanks for the patch regardless. |