• Arthur O'Dwyer's avatar
    Add a missing null-check, turning a segfault into an assertion. · 537a8027
    Arthur O'Dwyer authored
    Static analysis says:
    src\tcp_address.cpp(297): error V595: The 'res' pointer was utilized before it was verified against nullptr. Check lines: 297, 301.
    src\tcp_address.cpp(603): error V106: Implicit type conversion third argument 'full_bytes' of function 'memcmp' to memsize type.
    src\tcp_address.cpp(603): error V526: The 'memcmp' function returns 0 if corresponding buffers are equal. Consider examining the condition for mistakes.
    
    In fact the use of "memcmp" is correct, but the enclosing "if" isn't
    necessary, and the compiler is happier if "full_bytes" is a size_t.
    537a8027
tcp_address.cpp 17.4 KB