summaryrefslogtreecommitdiff
path: root/security/openssl/patches/patch-crypto_bn_bn__prime.pl
blob: eedcebbc91c518072e2bccbba0150933121ee181 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$NetBSD: patch-crypto_bn_bn__prime.pl,v 1.1.2.3 2014/06/05 13:20:18 tron Exp $

--- crypto/bn/bn_prime.pl.orig	Mon Mar 17 16:14:20 2014
+++ crypto/bn/bn_prime.pl
@@ -1,6 +1,8 @@
 #!/usr/local/bin/perl
 # bn_prime.pl
 
+use POSIX;
+
 $num=2048;
 $num=$ARGV[0] if ($#ARGV >= 0);
 
@@ -9,7 +11,7 @@ $p=1;
 loop: while ($#primes < $num-1)
 	{
 	$p+=2;
-	$s=int(sqrt($p));
+	$s=floor(sqrt($p));
 
 	for ($i=0; defined($primes[$i]) && $primes[$i]<=$s; $i++)
 		{