[libmath-prime-util-perl] 27/72: Fix sluggish validation of AES increment for common cases
Partha P. Mukherjee
ppm-guest at moszumanska.debian.org
Thu May 21 18:49:38 UTC 2015
This is an automated email from the git hooks/post-receive script.
ppm-guest pushed a commit to annotated tag v0.32
in repository libmath-prime-util-perl.
commit ce2b9ecc9aa07b75f8e86f7ed5ac2372f7ac72dc
Author: Dana Jacobsen <dana at acm.org>
Date: Fri Sep 13 13:27:48 2013 -0700
Fix sluggish validation of AES increment for common cases
---
lib/Math/Prime/Util.pm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/Math/Prime/Util.pm b/lib/Math/Prime/Util.pm
index 9f971da..556787f 100644
--- a/lib/Math/Prime/Util.pm
+++ b/lib/Math/Prime/Util.pm
@@ -1850,8 +1850,9 @@ sub is_almost_extra_strong_lucas_pseudoprime {
_validate_num($n) || _validate_positive_integer($n);
if (!defined $inc) {
$inc = 1;
- } else {
- _validate_positive_integer($inc, 1, 256);
+ } elsif ($inc ne '1' && $inc ne '2') {
+ (_validate_num($inc) && $inc > 0 && $inc < 257)
+ || _validate_positive_integer($inc, 1, 256);
}
return _XS_is_almost_extra_strong_lucas_pseudoprime($n, $inc)
if ref($n) ne 'Math::BigInt' && $n <= $_XS_MAXVAL;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmath-prime-util-perl.git
More information about the Pkg-perl-cvs-commits
mailing list