Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bn-patch): fix bad html evasion #9564

Merged
merged 2 commits into from
Jun 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions patches/bn.js+5.2.0.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
diff --git a/node_modules/bn.js/lib/bn.js b/node_modules/bn.js/lib/bn.js
index c9773da..46f3dcd 100644
index c9773da..0045880 100644
--- a/node_modules/bn.js/lib/bn.js
+++ b/node_modules/bn.js/lib/bn.js
@@ -2632,7 +2632,7 @@
for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);
if (i > 0) {
x.iushrn(i);
- while (i-- > 0) {
+ while (i--, i > 0) {
+ while ([i--][0] > 0) {
if (A.isOdd() || B.isOdd()) {
A.iadd(yp);
B.isub(xp);
Expand All @@ -16,7 +16,7 @@ index c9773da..46f3dcd 100644
if (j > 0) {
y.iushrn(j);
- while (j-- > 0) {
+ while (j--, j > 0) {
+ while ([j--][0] > 0) {
if (C.isOdd() || D.isOdd()) {
C.iadd(yp);
D.isub(xp);
Expand All @@ -25,7 +25,7 @@ index c9773da..46f3dcd 100644
if (i > 0) {
a.iushrn(i);
- while (i-- > 0) {
+ while (i--, i > 0) {
+ while ([i--][0] > 0) {
if (x1.isOdd()) {
x1.iadd(delta);
}
Expand All @@ -34,7 +34,7 @@ index c9773da..46f3dcd 100644
if (j > 0) {
b.iushrn(j);
- while (j-- > 0) {
+ while (j--, j > 0) {
+ while ([j--][0] > 0) {
if (x2.isOdd()) {
x2.iadd(delta);
}
Loading