On Fri, 6 Nov 2026 09:09:41 GMT, Matthias Baesken <[email protected]> wrote:
> btw. the UNC prefix strip - operation seems to be pretty similar (almost the > same) here to what we have in canonicalize_md.c > > https://github.com/openjdk/jdk/blob/7e94da336f62873842bbf71706b171c8c965a184/src/java.base/windows/native/libjava/WinNTFileSystem_md.c#L105 > > should we have a common function for it to avoid code duplication? > > One issue with the UNC-strip, we access elements 0,1,2,3 for the if-check to > find out if it is a UNC path. and later access even elements 4,5,6 . But is > it even clear that we have so many elements in the array ? Shouldn't we > better check this to avoid OOB access in some special/malformed input > scenarios ? Or is this not possible ( then a comment would be good). Hi, any comments on the UNC/length check ? Should we address this in a follow-up? ------------- PR Comment: https://git.openjdk.org/jdk/pull/33752#issuecomment-6763492545
