[sanitizer] Fix third parameter in COMMON_INTERCEPTOR_WRITE_RANGE in recv and recvfro...
authorMaxim Ostapenko <m.ostapenko@partner.samsung.com>
Thu, 25 Feb 2016 17:07:38 +0000 (17:07 +0000)
committerMaxim Ostapenko <m.ostapenko@partner.samsung.com>
Thu, 25 Feb 2016 17:07:38 +0000 (17:07 +0000)
commit50ca4464c4de6652f8ca85fdc4b77af4518c0202
tree0a4260fe73bd15eed1d1e9698708a95557cb9adb
parentbe16bbc92511e8d9d367c6bf2e28947d68b1f887
[sanitizer] Fix third parameter in COMMON_INTERCEPTOR_WRITE_RANGE in recv and recvfrom interceptors.

Pass res instead of len as third parameter to COMMON_INTERCEPTOR_WRITE_RANGE,
because otherwise we can write to unrelated memory (in MSan) or get wrong report (in ASan).

Differential Revision: http://reviews.llvm.org/D17608

llvm-svn: 261898
compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
compiler-rt/test/asan/TestCases/Linux/recvfrom.cc