This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a5052e
)
(perl #127743) limit the number of extra refs returned by STORABLE_freeze
author
Tony Cook
<tony@develop-help.com>
Mon, 20 Nov 2017 23:05:28 +0000
(
00:05
+0100)
committer
Tony Cook
<tony@develop-help.com>
Thu, 8 Feb 2018 02:58:10 +0000
(13:58 +1100)
Ensure some over enthusiastic STORABLE_freeze() doesn't cause us to
emit a negative reference count for SX_HOOK.
This fails to be parsed by older versions and flags 64-bit ids for new
versions of Storable.
dist/Storable/Storable.xs
patch
|
blob
|
blame
|
history
diff --git
a/dist/Storable/Storable.xs
b/dist/Storable/Storable.xs
index
8e013d7
..
819d743
100644
(file)
--- a/
dist/Storable/Storable.xs
+++ b/
dist/Storable/Storable.xs
@@
-3598,6
+3598,12
@@
static int store_hook(
}
}
+#ifdef HAS_U64
+ if (count > I32_MAX) {
+ CROAK(("Too many references returned by STORABLE_freeze()"));
+ }
+#endif
+
/*
* If they returned more than one item, we need to serialize some
* extra references if not already done.