View | Details | Raw Unified | Return to bug 236450 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (+1 lines)
Lines 2-7 Link Here
2
2
3
PORTNAME=	botan
3
PORTNAME=	botan
4
DISTVERSION=	2.9.0
4
DISTVERSION=	2.9.0
5
PORTREVISION=	1
5
CATEGORIES=	security
6
CATEGORIES=	security
6
MASTER_SITES=	http://botan.randombit.net/releases/
7
MASTER_SITES=	http://botan.randombit.net/releases/
7
PKGNAMESUFFIX=	2
8
PKGNAMESUFFIX=	2
(-)files/patch-src_lib_pbkdf_pgp__s2k_pgp__s2k.cpp (+13 lines)
Line 0 Link Here
1
https://github.com/randombit/botan/pull/1854
2
Replace upper_bound with lower_bound in pgp_s2k #1854
3
--- src/lib/pbkdf/pgp_s2k/pgp_s2k.cpp.orig	2019-01-04 11:14:58 UTC
4
+++ src/lib/pbkdf/pgp_s2k/pgp_s2k.cpp
5
@@ -61,7 +61,7 @@ uint8_t RFC4880_encode_count(size_t desired_iterations
6
    if(desired_iterations >= OPENPGP_S2K_ITERS[255])
7
       return 255;
8
 
9
-   auto i = std::upper_bound(OPENPGP_S2K_ITERS, OPENPGP_S2K_ITERS + 256, desired_iterations);
10
+   auto i = std::lower_bound(OPENPGP_S2K_ITERS, OPENPGP_S2K_ITERS + 256, desired_iterations);
11
 
12
    return static_cast<uint8_t>(i - OPENPGP_S2K_ITERS);
13
    }

Return to bug 236450