Uploaded image for project: 'Sentry (Retired)'
  1. Sentry (Retired)
  2. SENTRY-1658

Null pointer dereference in SentryShellHive

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.8.0
    • 1.8.0, 2.0.0
    • Sentry

    Description

      In SentryShellHive.java there is the following code:

        public static void main(String[] args) throws Exception {
          SentryShellHive sentryShell = new SentryShellHive();
          try {
            sentryShell.executeShell(args);
          } catch (Exception e) {
            LOGGER.error(e.getMessage(), e);
            Throwable current =  e;
            // find the first printable message;
            while (current != null && current.getMessage() == null) {
              current = current.getCause();
            }
            // current can be null here
             System.out.println("The operation failed." +
                (current.getMessage() == null ? "" : "  Message: " + current.getMessage()));
          }
        }
      

      Note that current can be null when we call getMessage()

      Attachments

        1. SENTRY-1658.001.patch
          1 kB
          Jan Hentschel

        Issue Links

          Activity

            People

              janh Jan Hentschel
              akolb Alex Kolbasov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: