From: David Vossel Date: Mon, 4 Jan 2010 16:39:11 +0000 (+0000) Subject: app_queue segfaults if realtime field uniqueid is NULL X-Git-Tag: 11.0.0-beta1~3673 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=688e1bbac6f601add35d791973c4d222011801c7;p=thirdparty%2Fasterisk.git app_queue segfaults if realtime field uniqueid is NULL (closes issue #16385) Reported by: haakon Patches: app_queue.c.patch uploaded by haakon (license 880) app_queue.c.patch_v2 uploaded by dvossel (license 671) Tested by: haakon git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@237327 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_queue.c b/apps/app_queue.c index 29fc040dbd..d41d27295d 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -1851,6 +1851,11 @@ static void rt_handle_member_record(struct call_queue *q, char *interface, const int paused = 0; int found = 0; + if (ast_strlen_zero(rt_uniqueid)) { + ast_log(LOG_WARNING, "Realtime field uniqueid is empty for memeber %s\n", S_OR(membername, "NULL")); + return; + } + if (penalty_str) { penalty = atoi(penalty_str); if (penalty < 0)