Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-819

Potential null pointer dereference in apps.svgbrowser.FindDialog.getNext()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.7
    • Fix Version/s: None
    • Component/s: SVG Viewer
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All

      Description

      org.apache.batik.apps.svgbrowser.FindDialog.getNext() starts with the following:

      protected GraphicsNode getNext(String text) {
      if (walker == null && gvtRoot != null)

      { walker = new GVTTreeWalker(gvtRoot); }

      GraphicsNode gn = walker.getCurrentGraphicsNode();

      When the method is entered if walker is null and gvtRoot is null then a GVTTreeWalker object will not be allocated and the an null pointer exception will be thrown.

      This was detected by FindBugs.

        Attachments

          Activity

            People

            • Assignee:
              batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
              Reporter:
              ddillard David Dillard
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: