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

Minor improvements of jdk C-coding

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 11
    • Fix Version/s: 11
    • Component/s: core-libs
    • Labels:
    • Resolved In Build:
      b23

      Backports

        Description

        Real issues:
        ------------

        transport.c
          Loop overruns the array, it iterates to 8. Only
          two iterations are intended.

        Unix.c
          getgroups can return -1. This is handled below,
          but not here. Return as for other errors.

        Useful code improvements.
        -------------------------

        zip_util.c
          pmsg is compared to null above. Thus, don't
          dereference it unconditionally below.
          I would assume pmsg is always != NULL, so that the
          check above could as well be turned into a guarantee.
          This fix is more safe, though.

        fontpath.c
          This is a real error, but harmless as the same size is
          returned.

        pcsc.c
          If size is 0, mszReaders is not allocated, but accessed
          below. return if size is 0.
          Here, too, I would assume that one could turn the if(size)
          check into a guarantee, but this way it's more safe.

        ecl_muilt.c
          This block calls point_mul, which requires the kt.flag
          is initialized.

        unpack.cpp
          lo is checked for null. If it is null, the dereference
          below fails.
          Return if lo == Null similar as above.
          Alternatively, one could turn the if (lo != null) check into
          a guarantee.


          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  goetz Goetz Lindenmaier
                  Reporter:
                  goetz Goetz Lindenmaier
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: