From 8b2aa2f5e9e1231f945370d1d0cb4914a110351d Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Thu, 3 May 2018 22:17:14 +0200 Subject: [PATCH] Avoid dereferencing a nullptr in bundled boost --- .../include/boost/archive/detail/iserializer.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bundled/boost-1.62.0/include/boost/archive/detail/iserializer.hpp b/bundled/boost-1.62.0/include/boost/archive/detail/iserializer.hpp index 2caaefc253..bf230a813b 100644 --- a/bundled/boost-1.62.0/include/boost/archive/detail/iserializer.hpp +++ b/bundled/boost-1.62.0/include/boost/archive/detail/iserializer.hpp @@ -481,7 +481,7 @@ struct load_pointer_type { }; template - static const basic_pointer_iserializer * register_type(Archive &ar, const T & /*t*/){ + static const basic_pointer_iserializer * register_type(Archive &ar, const T* const /*t*/){ // there should never be any need to load an abstract polymorphic // class pointer. Inhibiting code generation for this // permits abstract base classes to be used - note: exception @@ -520,7 +520,7 @@ struct load_pointer_type { } template - static void check_load(T & /* t */){ + static void check_load(T * const /* t */){ check_pointer_level< T >(); check_pointer_tracking< T >(); } @@ -534,8 +534,8 @@ struct load_pointer_type { template static void invoke(Archive & ar, Tptr & t){ - check_load(*t); - const basic_pointer_iserializer * bpis_ptr = register_type(ar, *t); + check_load(t); + const basic_pointer_iserializer * bpis_ptr = register_type(ar, t); const basic_pointer_iserializer * newbpis_ptr = ar.load_pointer( // note major hack here !!! // I tried every way to convert Tptr &t (where Tptr might -- 2.39.5