hrev47560 adds 1 changeset to branch 'master' old head: 741f2b55f2cabe1821ec902ebe65f2235de6ba7b new head: 970910c21ed82601d8e69c3963fb4d0b5133a339 overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=970910c+%5E741f2b5 ---------------------------------------------------------------------------- 970910c: Runtime loader: Fix unchecked return value Tested by running Attraction! from haikuware.com CID 1228648 [ John Scipione <jscipione@xxxxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev47560 Commit: 970910c21ed82601d8e69c3963fb4d0b5133a339 URL: http://cgit.haiku-os.org/haiku/commit/?id=970910c Author: John Scipione <jscipione@xxxxxxxxx> Date: Wed Jul 23 18:43:33 2014 UTC ---------------------------------------------------------------------------- 1 file changed, 3 insertions(+), 2 deletions(-) src/system/runtime_loader/runtime_loader.cpp | 5 +++-- ---------------------------------------------------------------------------- diff --git a/src/system/runtime_loader/runtime_loader.cpp b/src/system/runtime_loader/runtime_loader.cpp index 46c25df..fa507eb 100644 --- a/src/system/runtime_loader/runtime_loader.cpp +++ b/src/system/runtime_loader/runtime_loader.cpp @@ -186,8 +186,9 @@ try_open_executable(const char *dir, int dirLength, const char *name, // However, only if it's a known library location for (int i = 0; i < 4; ++i) { char buffer[PATH_MAX]; - __find_directory(kLibraryDirectories[i], -1, false, buffer, PATH_MAX); - if (strncmp(dir, buffer, dirLength) == 0) { + status_t result = __find_directory(kLibraryDirectories[i], -1, + false, buffer, PATH_MAX); + if (result == B_OK && strncmp(dir, buffer, dirLength) == 0) { subDirLen = strlen(abiSpecificSubDir) + 1; break; }