diff --git a/elfio/elfio_section.hpp b/elfio/elfio_section.hpp index 39c5d3e..e39c372 100644 --- a/elfio/elfio_section.hpp +++ b/elfio/elfio_section.hpp @@ -118,7 +118,7 @@ template class section_impl : public section void set_data( const char* raw_data, Elf_Word size ) override { if ( get_type() != SHT_NOBITS ) { - data = std::unique_ptr( new ( std::nothrow ) char[size] ); + data = std::unique_ptr( new ( std::nothrow ) char[size] ); if ( nullptr != data.get() && nullptr != raw_data ) { data_size = size; std::copy( raw_data, raw_data + size, data.get() ); @@ -149,7 +149,7 @@ template class section_impl : public section } else { data_size = 2 * ( data_size + size ); - std::unique_ptr new_data( + std::unique_ptr new_data( new ( std::nothrow ) char[data_size] ); if ( nullptr != new_data ) { @@ -270,7 +270,7 @@ template class section_impl : public section T header = { 0 }; Elf_Half index = 0; std::string name; - std::unique_ptr data; + std::unique_ptr data; Elf_Word data_size = 0; const endianess_convertor* convertor = nullptr; const address_translator* translator = nullptr; diff --git a/elfio/elfio_segment.hpp b/elfio/elfio_segment.hpp index c972c9b..8deea5a 100644 --- a/elfio/elfio_segment.hpp +++ b/elfio/elfio_segment.hpp @@ -214,7 +214,7 @@ template class segment_impl : public segment private: T ph = { 0 }; Elf_Half index = 0; - std::unique_ptr data; + std::unique_ptr data; std::vector sections; const endianess_convertor* convertor = nullptr; const address_translator* translator = nullptr;