|Summary:||ASTERISK-01765: [patch] Fixes crash when joining monitor files|
|Reporter:||Frank Mandarino (fmandarino)||Labels:|
|Date Opened:||2004-06-04 12:50:08||Date Closed:||2004-09-25 02:15:31|
|Environment:||Attachments:||( 0) res_monitor_join_patch.txt|
|Description:||Asterisk crashes when joining monitor files due to a ast_strlen_zero() call with a NULL pointer in ast_monitor_stop() . This problem first appeared in res_monitor.c version 1.12 (Bug 1268), but still exists in the latest CVS HEAD version. |
It is unclear why the ast_strlen_zero() call is performed. Removing it avoids the crash.
****** ADDITIONAL INFORMATION ******
The patch also removes the trailing '&' from the default soxmix command when appending the rm command to remove the original files. If this is not done, it seems possible that the rm command could be executed before the files are opened by soxmix.
|Comments:||By: Brian West (bkw918) 2004-06-04 13:59:49|
no this has been fixed in cvs I think.
By: Frank Mandarino (fmandarino) 2004-06-04 14:27:48
Yes, version 1.15 just came through for me, which fixes the crash.
However, the second part of my patch might still be useful. When the MONITOR_EXEC variable is not set, the default soxmix command that is used has the form:
( soxmix ... & && rm -f ... ) &
which means that the rm command will not wait for the soxmix command to finish, so there is a (perhaps very small) chance that rm might remove one of the files before soxmix opens them. It also means that the files will be removed even if soxmix fails, which is what the && is trying to prevent.
Removing the single & after the soxmix command would cause the rm to wait for soxmix to complete.
By: Mark Spencer (markster) 2004-06-04 15:51:37
Already fixed in CVS