Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-960

SyslogAppenderBase.stop() should check for non-null syslog output stream (sos) before calling close()

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.13
    • Fix Version/s: 1.1.2
    • Component/s: logback-core
    • Labels:
      None
    • Environment:

      Java 7 (java-1.7.0-openjdk-1.7.0.45.x86_64)
      CentOS 6.3

      Description

      Configuring a SyslogAppender with a bad hostname or IP address will result in the appender's SyslogOutputStream (sos) being null. If this appender's stop() method is called (which could be triggered from a reset() call in the context) an NPE is thrown because the stop method in SyslogAppenderBase does not check whether sos is null before attempting to call its close() method.

        Attachments

          Activity

            People

            • Assignee:
              logback-dev Logback dev list
              Reporter:
              lynchdp Pat Lynch
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: