Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8170544

Fix code scan findings in libnet

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • core-libs
    • None
    • b153
    • generic

      A code scan tool (coverity) has found some issues in the current libnet native code. Mostly it is about correct usage of pointers to SOCKETADDRESS / struct sockaddr.

      Basically the issue is that if struct sockaddr* is passed to a function and later on it is treated as struct sockaddr_in6, the latter structure is wider. So we should correctly pass pointers to SOCKETADDRESS which is a union of both, sockaddr_in and sockaddr_in6.

      Besides that, changes make the code a bit nicer to read as several casts can be spared.

            clanger Christoph Langer
            clanger Christoph Langer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: