Skip to content

Commit d21587d

Browse files
committed
Return empty instead of zero Buffer in modexp precompile on zero modlength
1 parent 01f8c8f commit d21587d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/precompiled/05-modexp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ module.exports = function (opts) {
110110
}
111111

112112
if (mLen.isZero()) {
113-
results.return = Buffer.from([0])
113+
results.return = Buffer.alloc(0)
114114
results.exception = 1
115115
return results
116116
}

0 commit comments

Comments
 (0)