Commons Dbcp
  1. Commons Dbcp
  2. DBCP-255

Uninitialized read of parent field in AbandonedTrace

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3
    • Labels:
      None
    • Environment:

      Fortify

      Description

      Seems funky - we pass 'parent' up when constructing AbandonedTrace, but it's just null. Is that right, if it is, let's just put null.

        Activity

        Hide
        Henri Yandell added a comment -

        In fact, parent is never written to; so definitely unhappy.

        I suspect all uses are wrapped in 'if-nulls', so it's never blown up.

        Show
        Henri Yandell added a comment - In fact, parent is never written to; so definitely unhappy. I suspect all uses are wrapped in 'if-nulls', so it's never blown up.
        Hide
        Phil Steitz added a comment -

        Looks to me like this instance field is superfluous and can be removed. Reads of this field in get/setLastUsed are null-guarded. Unless I am missing something, the instance field will always be null. The attached patch removes the field.

        Show
        Phil Steitz added a comment - Looks to me like this instance field is superfluous and can be removed. Reads of this field in get/setLastUsed are null-guarded. Unless I am missing something, the instance field will always be null. The attached patch removes the field.
        Hide
        Phil Steitz added a comment -

        Patch applied in r744932

        Show
        Phil Steitz added a comment - Patch applied in r744932

          People

          • Assignee:
            Unassigned
            Reporter:
            Henri Yandell
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development