Skip to content

Commit 2676e99

Browse files
authored
Merge pull request #161 from viaNull/fix/check_nPoints
Update engine_multiexp.js , check if nPoints == 0
2 parents 337b881 + 87c8895 commit 2676e99

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/engine_multiexp.js

+1
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ export default function buildMultiexp(curve, groupName) {
110110
}
111111

112112
const nPoints = Math.floor(buffBases.byteLength / sGIn);
113+
if (nPoints == 0) return G.zero;
113114
const sScalar = Math.floor(buffScalars.byteLength / nPoints);
114115
if( sScalar * nPoints != buffScalars.byteLength) {
115116
throw new Error("Scalar size does not match");

0 commit comments

Comments
 (0)