1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:57:35 +00:00

LibCrypto+LibJS: Fix broken subtraction of two negative signed bigints

Found by oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=29326
This commit is contained in:
Andreas Kling 2021-01-07 08:51:52 +01:00
parent cd2f85dc10
commit 7ed89703fe
2 changed files with 10 additions and 2 deletions

View file

@ -0,0 +1,8 @@
describe("minus behavior", () => {
test("the basics", () => {
expect(3n - 4n).toBe(-1n);
expect(3n - -4n).toBe(7n);
expect(-3n - -4n).toBe(-1n);
expect(-3n - 4n).toBe(-7n);
});
});