• Adam Simpkins's avatar
    fix off-by-one error in IPAddress::longestCommonPrefix() · dea4e166
    Adam Simpkins authored
    Summary:
    Fix an off-by-one error causing an ASAN abort.  When calling
    longestCommonPrefix() with a full mask, it would compare one byte past
    the end of the address data, and would end up writing past the end of
    the ba array on the stack.
    
    Test Plan:
    Built with ASAN, ran the unit tests, and verified the ASAN failure was
    gone.
    
    Reviewed By: jasmeetbagga@fb.com
    
    FB internal diff: D1284750
    dea4e166
IPAddress.h 5.18 KB