]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid dereferencing a nullptr in bundled boost 6439/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 3 May 2018 20:17:14 +0000 (22:17 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 3 May 2018 20:17:14 +0000 (22:17 +0200)
bundled/boost-1.62.0/include/boost/archive/detail/iserializer.hpp

index 2caaefc253c6d49cf3c9f8bd23e237ce4040f0cb..bf230a813bb56be8d3050cb1b1d5726c11e95189 100644 (file)
@@ -481,7 +481,7 @@ struct load_pointer_type {
     };
 
     template<class T>
-    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<class T>
-    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<class Tptr>
     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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.