From 0c20967a6bda705ee5779483047b6ff3c3d58730 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 4 Aug 2008 09:38:38 -0400 Subject: BUG: Fix operator precedence error in cmELF When attempting to load the RPATH out of a non-ELF file cmELF would crash because the check for a valid file was done with in correct operator precedence. See bug#7392. --- Source/cmELF.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index 083470c..3dff59c 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -884,8 +884,8 @@ cmELF::StringEntry const* cmELF::GetSOName() cmELF::StringEntry const* cmELF::GetRPath() { if(this->Valid() && - this->Internal->GetFileType() == cmELF::FileTypeExecutable || - this->Internal->GetFileType() == cmELF::FileTypeSharedLibrary) + (this->Internal->GetFileType() == cmELF::FileTypeExecutable || + this->Internal->GetFileType() == cmELF::FileTypeSharedLibrary)) { return this->Internal->GetRPath(); } @@ -899,8 +899,8 @@ cmELF::StringEntry const* cmELF::GetRPath() cmELF::StringEntry const* cmELF::GetRunPath() { if(this->Valid() && - this->Internal->GetFileType() == cmELF::FileTypeExecutable || - this->Internal->GetFileType() == cmELF::FileTypeSharedLibrary) + (this->Internal->GetFileType() == cmELF::FileTypeExecutable || + this->Internal->GetFileType() == cmELF::FileTypeSharedLibrary)) { return this->Internal->GetRunPath(); } -- cgit v0.12