You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- define preprocessor variable `NDEBUG=1`, when CMAKE_BUILD_TYPE is not
Debug (cause issue achille-roussel#20)
- fix overflowing buffer in test_message with strcpy.
strcpy also copied terminating '\0', which lead to length 13 (buffer
overflow) and failiure of nnxx_check() in test_message.cpp, l. 49
- simplify detection of test case locations in CMake
- more convenient output directory locations
Macro variable NDEBUG=1 was not defined in CMakeLists. Further, there was a buffer overflow due to std::strcpy appending a trailing \0 character. Does PR #21 solve this problem?
Hello.
After build and run:
ctest -C Debug .
first test is fails, other tests is ok.
message.cpp:
...
message::~message()
{
if (m_data != nullptr) {
#ifdef NDEBUG
nn_freemsg(m_data);
#else
if (nn_freemsg(m_data) != 0) { // !!! THIS Fails !!!
std::fprintf(stderr, "warning: nn_freemsg: %s\n", strerror());
}
#endif
}
}
...
Build and compile with VS 2017 with last updates.
Using stable 'nanomsg', version v1.1.5
The text was updated successfully, but these errors were encountered: