Mercurial > hg > release > icedtea7-forest-2.6 > jdk
changeset 9995:dd1fbe9cc20d
8242685: Better Path Validation
Reviewed-by: alanb, rhalade
author | bpb |
---|---|
date | Tue, 28 Apr 2020 10:14:25 -0700 |
parents | e8dc3ef4f0c0 |
children | 245d5bd872ed |
files | src/solaris/classes/sun/nio/fs/UnixUriUtils.java |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/solaris/classes/sun/nio/fs/UnixUriUtils.java Tue Jun 02 08:48:00 2020 -0700 +++ b/src/solaris/classes/sun/nio/fs/UnixUriUtils.java Tue Apr 28 10:14:25 2020 -0700 @@ -83,7 +83,8 @@ if (b == 0) throw new IllegalArgumentException("Nul character not allowed"); } else { - assert c < 0x80; + if (c == 0 || c >= 0x80) + throw new IllegalArgumentException("Bad escape"); b = (byte)c; } result[rlen++] = b;