From 885136d3b6a94cbbb9ea53f2c41d39c8ed145690 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Tue, 17 Sep 2013 00:23:28 +0000 Subject: [PATCH] Check the function we just called for errors, not an incoming argument. Noticed by inspection. llvm-svn: 190828 --- compiler-rt/lib/sanitizer_common/sanitizer_linux.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc index 52178f9621bb..10c112ae98e4 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc @@ -685,7 +685,7 @@ uptr ReadBinaryName(/*out*/char *buf, uptr buf_len) { uptr module_name_len = internal_readlink( "/proc/self/exe", buf, buf_len); int readlink_error; - if (internal_iserror(buf_len, &readlink_error)) { + if (internal_iserror(module_name_len, &readlink_error)) { if (proc_self_exe_cache_len) { // If available, use the cached module name. CHECK_LE(proc_self_exe_cache_len, buf_len);