Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F34564401
T287347.patch
TheVoidwalker (Void)
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
TheVoidwalker
Jul 26 2021, 7:08 PM
2021-07-26 19:08:16 (UTC+0)
Size
945 B
Referenced Files
None
Subscribers
None
T287347.patch
View Options
From 19b7ffd46f2d6ce8514882515b7e99f9809e8768 Mon Sep 17 00:00:00 2001
From: The-Voidwalker <voidwalker.wikipedia@gmail.com>
Date: Mon, 26 Jul 2021 15:02:19 -0400
Subject: [PATCH] Fix use of egLoopsCountLimit
egLoopsCounterLimit does not exist and was a likely typo.
Additionally, cast the variable to int, as null is not greater than -1
Bug: T287347
---
ExtLoops.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ExtLoops.php b/ExtLoops.php
index 1c641b3..f9a35dd 100644
--- a/ExtLoops.php
+++ b/ExtLoops.php
@@ -324,8 +324,8 @@ class ExtLoops {
* @return bool
*/
public static function maxLoopsPerformed( Parser $parser ) {
- global $egLoopsCounterLimit;
- return $egLoopsCounterLimit > -1 && $parser->mExtLoopsCounter >= $egLoopsCounterLimit;
+ global $egLoopsCountLimit;
+ return (int)$egLoopsCountLimit > -1 && $parser->mExtLoopsCounter >= (int)$egLoopsCountLimit;
}
/**
--
2.32.0.windows.2
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
9136091
Default Alt Text
T287347.patch (945 B)
Attached To
Mode
T287347: Loops can cause php-fpm exhaustion (CVE-2021-42040)
Attached
Detach File
Event Timeline
Log In to Comment