Uploaded image for project: 'Corda'
  1. CORDA-2772

net.corda.core.internal.LazyStickyPool#toIndex can create a negative index

    Details

    • Type: Bug
    • Status: Done (View workflow)
    • Priority: Medium
    • Resolution: Done
    • Affects versions: Corda 4, Corda Enterprise 4 RC05
    • Fix versions: Corda 4.1
    • Components: None
    • Labels:
      None

      Description

      In the very rare event if stickTo.hashCode() is MIN_VALUE, Math.abs() will return MIN_VALUE.

          private fun toIndex(stickTo: Any): Int {
              return Math.abs(stickTo.hashCode()) % boxes.size
          }
      

        Attachments

          Activity

            People

            • Assignee:
              fp Farzad Pezeshkpour
              Reporter:
              fp Farzad Pezeshkpour
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: