Package: php-phpseclib / 2.0.30-2+deb11u2

0032-BigInteger-phpseclib-2.0-updates.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From: terrafrost <terrafrost@gmail.com>
Date: Sat, 24 Feb 2024 13:29:02 -0600
Subject: BigInteger: phpseclib 2.0 updates

Origin: upstream, https://github.com/phpseclib/phpseclib/commit/2870c8fab3f132d2ed40a66c97a36fe5ab625698
---
 phpseclib/Math/BigInteger.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php
index 9934323..3e650b6 100644
--- a/phpseclib/Math/BigInteger.php
+++ b/phpseclib/Math/BigInteger.php
@@ -736,13 +736,13 @@ class BigInteger
      */
     function getLength()
     {
-        if (MATH_BIGINTEGER_MODE != MATH_BIGINTEGER_MODE_INTERNAL) {
+        if (MATH_BIGINTEGER_MODE != self::MODE_INTERNAL) {
             return strlen($this->toBits());
         }
 
         $max = count($this->value) - 1;
         return $max != -1 ?
-            $max * MATH_BIGINTEGER_BASE + ceil(log($a->value[$max] + 1, 2)) :
+            $max * self::$base + ceil(log($a->value[$max] + 1, 2)) :
             0;
     }