Asterisk
  1. Asterisk
  2. ASTERISK-12984

app_directory crashses Asterisk when voicemail entry doesn't have a name

    Details

    • Type: Bug Bug
    • Status: Closed
    • Severity: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Target Release Version/s: None
    • Labels:
      None
    • Mantis ID:
      13804
    • Regression:
      No

      Description

      example voicemail.conf:
      [voicemail-context]
      101 => 101
      102 => 102,Extension 102

      After the Directory application requests the first three letters for the search, when it performs the search, it will crash asterisk when it tries to parse the line with no name.

      My fix was to change the offending lines to something like the following, but it appears a check needs to be added.
      101 => 101,101

        Activity

        Hide
        Mitch Sharp added a comment -

        Attached file asterisk-1.6.0.1-app_directory-bugreport.txt with gdb output.

        Show
        Mitch Sharp added a comment - Attached file asterisk-1.6.0.1-app_directory-bugreport.txt with gdb output.
        Hide
        Mark Michelson added a comment -

        Yeah, this is a simple case where the idea of a NULL pointer was not considered in the design and needs to be checked for. This will be a really easy fix and I'll have it committed soon.

        Show
        Mark Michelson added a comment - Yeah, this is a simple case where the idea of a NULL pointer was not considered in the design and needs to be checked for. This will be a really easy fix and I'll have it committed soon.
        Hide
        Digium Subversion added a comment -

        Repository: asterisk
        Revision: 152646

        U trunk/apps/app_directory.c

        ------------------------------------------------------------------------
        r152646 | mmichelson | 2008-10-29 15:42:51 -0500 (Wed, 29 Oct 2008) | 9 lines

        If there was no named defined in a voicemail.conf mailbox
        entry, then app_directory would crash when attempting to
        read that entry from the file. We now check for the NULL
        or empty string properly so that there will be no crash.

        (closes issue ASTERISK-12984)
        Reported by: bluecrow76

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

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

        Show
        Digium Subversion added a comment - Repository: asterisk Revision: 152646 U trunk/apps/app_directory.c ------------------------------------------------------------------------ r152646 | mmichelson | 2008-10-29 15:42:51 -0500 (Wed, 29 Oct 2008) | 9 lines If there was no named defined in a voicemail.conf mailbox entry, then app_directory would crash when attempting to read that entry from the file. We now check for the NULL or empty string properly so that there will be no crash. (closes issue ASTERISK-12984 ) Reported by: bluecrow76 ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=152646

          People

          • Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development