Asterisk
  1. Asterisk
  2. ASTERISK-15269

[patch] app_queue segfaults if realtime field uniqueid is NULL

    Details

    • Type: Bug Bug
    • Status: Closed
    • Severity: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Target Release Version/s: None
    • Component/s: Applications/app_queue
    • Labels:
      None
    • SVN Revision Number:
      232810
    • Mantis ID:
      16385
    • Regression:
      Yes

      Description

      This patch fixes the issue by notifying the user about the error.

      I think this might be the cause of another bug report:
      https://issues.asterisk.org/view.php?id=16037

                • ADDITIONAL INFORMATION ******

      In 1.6.0.5 and below, realtime did not care about the uniqueid field in the database. If you upgrade without taking notice of this new change, asterisk could crash unexpectably, if by chance your uniqueid fields are NULL.

      This would be a freak accident, but I still think asterisk should segfault because of it.

      1. app_queue.c.patch
        0.6 kB
        Håkon Nessjøen

        Issue Links

          Activity

          Hide
          Håkon Nessjøen added a comment -

          Note that \n is missing from the log strings. Should be added before adding to trunk. Sorry

          Would love for some karma, even if this is so small patch and you don't use karma anymore

          Show
          Håkon Nessjøen added a comment - Note that \n is missing from the log strings. Should be added before adding to trunk. Sorry Would love for some karma, even if this is so small patch and you don't use karma anymore
          Hide
          David Vossel added a comment -

          Haakon, your code looks good, thanks for the contribution! I tweaked a few things I noticed while reviewing it. Just looking at the code, membername does not need a check. uniqueid will crash if it was NULL for some reason, but a warning should also be present if it is a zero length string.

          Show
          David Vossel added a comment - Haakon, your code looks good, thanks for the contribution! I tweaked a few things I noticed while reviewing it. Just looking at the code, membername does not need a check. uniqueid will crash if it was NULL for some reason, but a warning should also be present if it is a zero length string.
          Hide
          Digium Subversion added a comment -

          Repository: asterisk
          Revision: 237327

          U trunk/apps/app_queue.c

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

          app_queue segfaults if realtime field uniqueid is NULL

          (closes issue ASTERISK-15269)
          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

          ------------------------------------------------------------------------

          http://svn.digium.com/view/asterisk?view=rev&revision=237327

          Show
          Digium Subversion added a comment - Repository: asterisk Revision: 237327 U trunk/apps/app_queue.c ------------------------------------------------------------------------ r237327 | dvossel | 2010-01-04 10:39:12 -0600 (Mon, 04 Jan 2010) | 10 lines app_queue segfaults if realtime field uniqueid is NULL (closes issue ASTERISK-15269 ) 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 ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=237327
          Hide
          Håkon Nessjøen added a comment -

          Typo: "memeber" instead of "member" in new patch

          Show
          Håkon Nessjøen added a comment - Typo: "memeber" instead of "member" in new patch
          Hide
          Digium Subversion added a comment -

          Repository: asterisk
          Revision: 237328

          _U branches/1.6.2/
          U branches/1.6.2/apps/app_queue.c

          ------------------------------------------------------------------------
          r237328 | dvossel | 2010-01-04 10:50:24 -0600 (Mon, 04 Jan 2010) | 16 lines

          Merged revisions 237327 via svnmerge from
          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 ASTERISK-15269)
          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
          ........

          ------------------------------------------------------------------------

          http://svn.digium.com/view/asterisk?view=rev&revision=237328

          Show
          Digium Subversion added a comment - Repository: asterisk Revision: 237328 _U branches/1.6.2/ U branches/1.6.2/apps/app_queue.c ------------------------------------------------------------------------ r237328 | dvossel | 2010-01-04 10:50:24 -0600 (Mon, 04 Jan 2010) | 16 lines Merged revisions 237327 via svnmerge from 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 ASTERISK-15269 ) 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 ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=237328
          Hide
          Digium Subversion added a comment -

          Repository: asterisk
          Revision: 237329

          _U branches/1.6.1/
          U branches/1.6.1/apps/app_queue.c

          ------------------------------------------------------------------------
          r237329 | dvossel | 2010-01-04 10:51:19 -0600 (Mon, 04 Jan 2010) | 16 lines

          Merged revisions 237327 via svnmerge from
          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 ASTERISK-15269)
          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
          ........

          ------------------------------------------------------------------------

          http://svn.digium.com/view/asterisk?view=rev&revision=237329

          Show
          Digium Subversion added a comment - Repository: asterisk Revision: 237329 _U branches/1.6.1/ U branches/1.6.1/apps/app_queue.c ------------------------------------------------------------------------ r237329 | dvossel | 2010-01-04 10:51:19 -0600 (Mon, 04 Jan 2010) | 16 lines Merged revisions 237327 via svnmerge from 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 ASTERISK-15269 ) 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 ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=237329
          Hide
          Digium Subversion added a comment -

          Repository: asterisk
          Revision: 237330

          _U branches/1.6.0/

          ------------------------------------------------------------------------
          r237330 | dvossel | 2010-01-04 10:52:03 -0600 (Mon, 04 Jan 2010) | 15 lines

          Blocked revisions 237327 via svnmerge

          ........
          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 ASTERISK-15269)
          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
          ........

          ------------------------------------------------------------------------

          http://svn.digium.com/view/asterisk?view=rev&revision=237330

          Show
          Digium Subversion added a comment - Repository: asterisk Revision: 237330 _U branches/1.6.0/ ------------------------------------------------------------------------ r237330 | dvossel | 2010-01-04 10:52:03 -0600 (Mon, 04 Jan 2010) | 15 lines Blocked revisions 237327 via svnmerge ........ 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 ASTERISK-15269 ) 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 ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=237330

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development