RFR: 8u: 8076475: Misuses of strncpy/strncat

Thomas Stüfe thomas.stuefe at gmail.com
Thu Apr 2 14:45:43 UTC 2020


Hi Andrew x 2,

I had another look at these changes after all these years, and they still
look fine to me. They do fix a couple of potential errors where strings may
be left unterminated on truncation. However I agree with AH that the
possibility of this happening is remote, so its your call.

Cheers, thomas

On Thu, Apr 2, 2020 at 10:39 AM Andrew Haley <aph at redhat.com> wrote:

> On 4/1/20 6:54 PM, Andrew Hughes wrote:
> > * src/share/vm/runtime/os.{c,h}pp
> >   If we're going to add strdup_check_oom, I think this should be done by
> > backporting JDK-6424123 [1] so it's used consistently throughout the
> > codebase rather than just the two call sites in this patch.
>
> I strongly disagree that we should import such a patch into JDK 8 for
> this reason.
>
> It's a judgement call, of course. We have two desiderata here: those
> of consistently backporting patches and minimizing changes. As JDK 8
> matures, minimizing change has become more and more important, and it's
> perfectly OK to snip small fragments of patches such as this in order
> to minimize change.
>
> Of course I'm aware of the other side of the argument, but I don't
> think it's as important.
>
> --
> Andrew Haley  (he/him)
> Java Platform Lead Engineer
> Red Hat UK Ltd. <https://www.redhat.com>
> https://keybase.io/andrewhaley
> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
>
>


More information about the jdk8u-dev mailing list