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