bc-java icon indicating copy to clipboard operation
bc-java copied to clipboard

Unchecked function call on potentially null values in EC5Util.

Open loosebazooka opened this issue 1 year ago • 0 comments

EC5Util can end up with a null pointer exception if a malformed Point is passed in.

https://github.com/bcgit/bc-java/blob/main/prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/util/EC5Util.java#L355

Does it make sense to check on point.getAffineXCoord or point.getAffineYCoord to ensure they aren't null and then throw an IllegalArgumentException on a malformed point?

I'm not even sure how our fuzzing test got to this point. I'm trying to find the test case data that caused it and I'll update this bug.

loosebazooka avatar Aug 20 '24 20:08 loosebazooka