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