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

Null pointer dereference in SentryShellHive

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.0
    • Fix Version/s: 1.8.0, 2.0.0
    • Component/s: Sentry
    • Labels:

      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: