Skip to content

Commit

Permalink
Merge pull request #161 from viaNull/fix/check_nPoints
Browse files Browse the repository at this point in the history
Update engine_multiexp.js , check if nPoints == 0
  • Loading branch information
OBrezhniev authored Oct 7, 2024
2 parents 337b881 + 87c8895 commit 2676e99
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/engine_multiexp.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export default function buildMultiexp(curve, groupName) {
}

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

0 comments on commit 2676e99

Please sign in to comment.