Blame SOURCES/Storable-3.16-Storable-make-count-large-enough.patch

3165cb
From f7724052d1b8b75339f5ec2cc3d5b35ca5d130b5 Mon Sep 17 00:00:00 2001
3165cb
From: Tony Cook <tony@develop-help.com>
3165cb
Date: Wed, 7 Aug 2019 11:13:53 +1000
3165cb
Subject: [PATCH] Storable: make count large enough
3165cb
MIME-Version: 1.0
3165cb
Content-Type: text/plain; charset=UTF-8
3165cb
Content-Transfer-Encoding: 8bit
3165cb
3165cb
AvARRAY() could be very large, and we check for that at line 3807,
3165cb
but int was (potentially) too small to make that comparison
3165cb
meaningful.
3165cb
3165cb
CID 174681.
3165cb
3165cb
Signed-off-by: Petr Písař <ppisar@redhat.com>
3165cb
---
3165cb
 dist/Storable/Storable.xs | 6 +++---
3165cb
 1 file changed, 3 insertions(+), 3 deletions(-)
3165cb
3165cb
diff --git a/dist/Storable/Storable.xs b/dist/Storable/Storable.xs
3165cb
index 6a45d8adf2..d75125b839 100644
3165cb
--- a/dist/Storable/Storable.xs
3165cb
+++ b/dist/Storable/Storable.xs
3165cb
@@ -3662,7 +3662,7 @@ static int store_hook(
3165cb
     SV *ref;
3165cb
     AV *av;
3165cb
     SV **ary;
3165cb
-    int count;			/* really len3 + 1 */
3165cb
+    IV count;			/* really len3 + 1 */
3165cb
     unsigned char flags;
3165cb
     char *pv;
3165cb
     int i;
3165cb
@@ -3752,7 +3752,7 @@ static int store_hook(
3165cb
     SvREFCNT_dec(ref);			/* Reclaim temporary reference */
3165cb
 
3165cb
     count = AvFILLp(av) + 1;
3165cb
-    TRACEME(("store_hook, array holds %d items", count));
3165cb
+    TRACEME(("store_hook, array holds %" IVdf " items", count));
3165cb
 
3165cb
     /*
3165cb
      * If they return an empty list, it means they wish to ignore the
3165cb
@@ -3986,7 +3986,7 @@ static int store_hook(
3165cb
      */
3165cb
 
3165cb
     TRACEME(("SX_HOOK (recursed=%d) flags=0x%x "
3165cb
-             "class=%" IVdf " len=%" IVdf " len2=%" IVdf " len3=%d",
3165cb
+             "class=%" IVdf " len=%" IVdf " len2=%" IVdf " len3=%" IVdf,
3165cb
              recursed, flags, (IV)classnum, (IV)len, (IV)len2, count-1));
3165cb
 
3165cb
     /* SX_HOOK <flags> [<extra>] */
3165cb
-- 
3165cb
2.20.1
3165cb