]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 237327 via svnmerge from
authorDavid Vossel <dvossel@digium.com>
Mon, 4 Jan 2010 16:51:19 +0000 (16:51 +0000)
committerDavid Vossel <dvossel@digium.com>
Mon, 4 Jan 2010 16:51:19 +0000 (16:51 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r237327 | dvossel | 2010-01-04 10:39:11 -0600 (Mon, 04 Jan 2010) | 10 lines

  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/branches/1.6.1@237329 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index 26bae613a309db436c350fb5a542e8fb2cd6764d..b546845c19d3ccbefdc998f41f1e4a9dbd88b041 100644 (file)
@@ -1375,6 +1375,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)