mirror of
https://github.com/asterisk/asterisk.git
synced 2026-01-06 10:01:21 +00:00
Use ast_strlen_zero to avoid a crash when a Dial() string isn't passed to ParkAndAnnounce
(closes issue #16731) Reported by: sebele67 Patches: issue16731_20100129.diff uploaded by seanbright (license 71) Tested by: sebele67 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@251410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -112,7 +112,7 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data)
|
||||
timeout *= 1000;
|
||||
}
|
||||
dial = strsep(&s, "|");
|
||||
if(!dial) {
|
||||
if (ast_strlen_zero(dial)) {
|
||||
ast_log(LOG_WARNING, "PARK: A dial resource must be specified i.e: Console/dsp or Zap/g1/5551212\n");
|
||||
ast_module_user_remove(u);
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user