You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
1.0 KiB
27 lines
1.0 KiB
From debdf8ce55d2d42c15bc99a09bd2c37c4c910630 Mon Sep 17 00:00:00 2001
|
|
From: David Tardon <dtardon@redhat.com>
|
|
Date: Sat, 18 Nov 2017 10:06:24 +0100
|
|
Subject: [PATCH] ofz#4303 avoid signed integer overflow
|
|
|
|
/usr/include/boost/spirit/home/qi/numeric/detail/real_impl.hpp:110:26: runtime error: signed integer overflow: -2147483647 - 19 cannot be represented in type 'int'
|
|
---
|
|
include/boost/spirit/home/qi/numeric/detail/real_impl.hpp | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/include/boost/spirit/home/qi/numeric/detail/real_impl.hpp b/include/boost/spirit/home/qi/numeric/detail/real_impl.hpp
|
|
index 3e7ab18a9..4a65bd79c 100644
|
|
--- a/include/boost/spirit/home/qi/numeric/detail/real_impl.hpp
|
|
+++ b/include/boost/spirit/home/qi/numeric/detail/real_impl.hpp
|
|
@@ -108,6 +108,8 @@ namespace boost { namespace spirit { namespace traits
|
|
inline bool
|
|
scale(int exp, int frac, T& n, AccT acc_n)
|
|
{
|
|
+ if (exp < std::numeric_limits<int>::min() + frac)
|
|
+ return false;
|
|
return scale(exp - frac, n, acc_n);
|
|
}
|
|
|
|
--
|
|
2.14.3
|
|
|