RFR: 8249783: Simplify DerValue and DerInputStream [v2]

Valerie Peng valeriep at openjdk.java.net
Tue Sep 29 04:02:02 UTC 2020


On Sat, 26 Sep 2020 00:33:17 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> It also seems strange that it only checks that length !=0. The spec of BitString seems to suggest the length must
>> be >=2 where the first byte is the number of padding bits. It seems that the right check should be (end - start) > 1?
>
> I'll look into it. If there's anything wrong, will fix and add a regression test. What if there is zero bit?
> 
> And yes, the old exception message is better. Don't know why I modified it.

0-bit BitArray? Maybe no need for this scenario? Just my wild guess. Keep the same existing behavior is fine.

-------------

PR: https://git.openjdk.java.net/jdk/pull/232



More information about the security-dev mailing list