Open nobuddhy opened 1 year ago
m_is_wide is not set in these both operators so if wideness has changed it might lead to call wrong delete[] later
m_is_wide
delete[]
https://github.com/boostorg/interprocess/blob/a0c5a8ff176434c9024d4540ce092a2eebb8c5c3/include/boost/interprocess/detail/char_wchar_holder.hpp#L54-L61
https://github.com/boostorg/interprocess/blob/a0c5a8ff176434c9024d4540ce092a2eebb8c5c3/include/boost/interprocess/detail/char_wchar_holder.hpp#L63-L70
if condition should be opposite currently it always assigns null string
if
https://github.com/boostorg/interprocess/blob/a0c5a8ff176434c9024d4540ce092a2eebb8c5c3/include/boost/interprocess/detail/char_wchar_holder.hpp#L72-L79
https://github.com/boostorg/interprocess/blob/a0c5a8ff176434c9024d4540ce092a2eebb8c5c3/include/boost/interprocess/detail/char_wchar_holder.hpp#L86-L90
m_is_wide
is not set in these both operators so if wideness has changed it might lead to call wrongdelete[]
laterhttps://github.com/boostorg/interprocess/blob/a0c5a8ff176434c9024d4540ce092a2eebb8c5c3/include/boost/interprocess/detail/char_wchar_holder.hpp#L54-L61
https://github.com/boostorg/interprocess/blob/a0c5a8ff176434c9024d4540ce092a2eebb8c5c3/include/boost/interprocess/detail/char_wchar_holder.hpp#L63-L70
if
condition should be opposite currently it always assigns null stringhttps://github.com/boostorg/interprocess/blob/a0c5a8ff176434c9024d4540ce092a2eebb8c5c3/include/boost/interprocess/detail/char_wchar_holder.hpp#L72-L79
https://github.com/boostorg/interprocess/blob/a0c5a8ff176434c9024d4540ce092a2eebb8c5c3/include/boost/interprocess/detail/char_wchar_holder.hpp#L86-L90