find_path_for_path_etc(): Fail for B_FIND_PATH_IMAGE_PATH

There's no image in this case. We would just return the path we were
given.
This commit is contained in:
Ingo Weinhold
2013-11-19 02:05:35 +01:00
parent 22e92014f0
commit 81522ad41b
+3
View File
@@ -623,6 +623,9 @@ __find_path_for_path_etc(const char* path, const char* dependency,
const char* architecture, path_base_directory baseDirectory,
const char* subPath, uint32 flags, char* pathBuffer, size_t bufferSize)
{
if (baseDirectory == B_FIND_PATH_IMAGE_PATH)
return B_BAD_VALUE;
char referencePath[B_PATH_NAME_LENGTH];
if (strlcpy(referencePath, path, sizeof(referencePath))
>= sizeof(referencePath)) {