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:
845ccf3
)
_invlist_intersection() didn't work for NULL first param
author
Karl Williamson
<public@khwilliamson.com>
Tue, 23 Jul 2013 16:40:07 +0000
(10:40 -0600)
committer
Karl Williamson
<public@khwilliamson.com>
Tue, 23 Jul 2013 16:52:14 +0000
(10:52 -0600)
It is supposed to accept a NULL first parameter (one of the operands to
the intersection). This adds a special case for it.
regcomp.c
patch
|
blob
|
blame
|
history
diff --git
a/regcomp.c
b/regcomp.c
index
0211f96
..
be45caa
100644
(file)
--- a/
regcomp.c
+++ b/
regcomp.c
@@
-7836,7
+7836,7
@@
Perl__invlist_intersection_maybe_complement_2nd(pTHX_ SV* const a, SV* const b,
assert(a != b);
/* Special case if either one is empty */
- len_a = _invlist_len(a);
+ len_a =
(a == NULL) ? 0 :
_invlist_len(a);
if ((len_a == 0) || ((len_b = _invlist_len(b)) == 0)) {
if (len_a != 0 && complement_b) {