aboutsummaryrefslogtreecommitdiff
path: root/layers/image.cpp
diff options
context:
space:
mode:
authorDaniel Dadap <ddadap@nvidia.com>2015-09-30 11:50:51 -0500
committerjon <jon@lunarg.com>2015-10-29 14:32:39 -0600
commit23797aa908c36dab75d7dc83791ec44a39128448 (patch)
treed3b24809ca10c8ecc94a495cd3c66f4a64a5c826 /layers/image.cpp
parent9e9792ad3a2524bfb91a94b4ebaf316eb006719b (diff)
downloadusermoji-23797aa908c36dab75d7dc83791ec44a39128448.tar.xz
loader: add helper for combining paths
Add a helper function to combine an arbitrary number of path elements, separating them with the platform-specific directory separator, and use it in places where path combining is currently achieved through direct string manipulation. As an additional cleanup, update loader_get_fullpath() to duplicate the search path string internally, rather than relying on the caller to do so. Since loader_get_fullpath() and loader_expand_path() no longer modify input strings, and loader_expand_path() no longer requires that the caller append the DIRECTORY_SYMBOL ahead of time, acrobatics to duplicate strings to prevent modification and/or to add directory separators are no longer necessary. This change will result a behavior change on Windows: the existing logic for loading an ICD that is specified as a bare filename, and not as an absolute or relative path, is to search for a driver with the given ICD name in the DEFAULT_VK_DRIVERS_PATH search path on Linux, and to use the given ICD name as-is on Windows. This could lead to DLL injection attack on Windows. Merge the Linux/Windows behavior to limit the search for ICD filenames to the default search path on Windows as well, which is also more consistent with the behavior described in the loader spec. Conflicts: loader/loader.c
Diffstat (limited to 'layers/image.cpp')
0 files changed, 0 insertions, 0 deletions