From 337187317e6dca079479010d433d64485ebcb4a4 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Sat, 18 Nov 2017 16:24:47 +0100 Subject: [PATCH] ofz#4303 fix another signed int overflow in boost (#996) --- projects/dlplibs/build.sh | 1 + projects/dlplibs/ofz4303.patch | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 projects/dlplibs/ofz4303.patch diff --git a/projects/dlplibs/build.sh b/projects/dlplibs/build.sh index 14804f459..1a38fb9f7 100755 --- a/projects/dlplibs/build.sh +++ b/projects/dlplibs/build.sh @@ -64,6 +64,7 @@ popd tar -xjf $SRC/boost_1_65_1.tar.bz2 pushd boost_1_65_1 patch -p2 < $SRC/ofz2894.patch +patch -p2 < $SRC/ofz4303.patch export CPPFLAGS="-I$(pwd)" popd diff --git a/projects/dlplibs/ofz4303.patch b/projects/dlplibs/ofz4303.patch new file mode 100644 index 000000000..320019402 --- /dev/null +++ b/projects/dlplibs/ofz4303.patch @@ -0,0 +1,26 @@ +From debdf8ce55d2d42c15bc99a09bd2c37c4c910630 Mon Sep 17 00:00:00 2001 +From: David Tardon +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::min() + frac) ++ return false; + return scale(exp - frac, n, acc_n); + } + +-- +2.14.3 +