Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gmp.diff « patches « build_environment « build_files - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bf22f93bc4f094c07c5e932e95e3694dd251dc73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- a/mpz/inp_raw.c	Tue Dec 22 23:49:51 2020 +0100
+++ b/mpz/inp_raw.c	Thu Oct 21 19:06:49 2021 +0200
@@ -88,8 +88,11 @@

   abs_csize = ABS (csize);

+  if (UNLIKELY (abs_csize > ~(mp_bitcnt_t) 0 / 8))
+    return 0; /* Bit size overflows */
+
   /* round up to a multiple of limbs */
-  abs_xsize = BITS_TO_LIMBS (abs_csize*8);
+  abs_xsize = BITS_TO_LIMBS ((mp_bitcnt_t) abs_csize * 8);

   if (abs_xsize != 0)
     {