]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix crash that would occur if an empty member was specified in queues.conf.
authorMark Michelson <mmichelson@digium.com>
Tue, 31 Mar 2009 22:00:01 +0000 (22:00 +0000)
committerMark Michelson <mmichelson@digium.com>
Tue, 31 Mar 2009 22:00:01 +0000 (22:00 +0000)
(closes issue #14796)
Reported by: pida

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@185599 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index 374f4e9451ebce3bcbefedb80070b039a38a5b8b..e7d21be7ac1b12ae118dc429534e473cb99f8ff5 100644 (file)
@@ -4404,6 +4404,11 @@ static int reload_queues(void)
                                                struct member tmpmem;
                                                membername = NULL;
 
+                                               if (ast_strlen_zero(var->value)) {
+                                                       ast_log(LOG_WARNING, "Empty queue member definition at line %d. Moving on!\n", var->lineno);
+                                                       continue;
+                                               }
+
                                                /* Add a new member */
                                                ast_copy_string(parse, var->value, sizeof(parse));