libobs: Handle empty path in os_get_path_extension
os_readdir might return an empty path if the OS filename doesn't fit into the buffer after os_wcs_to_utf8. If this empty path is then passed to os_get_path_extension it causes a crash.
This commit is contained in:
parent
267874ad92
commit
269ebd2983
@ -653,6 +653,9 @@ const char *os_get_path_extension(const char *path)
|
||||
char *period;
|
||||
char *slash;
|
||||
|
||||
if (!path[0])
|
||||
return NULL;
|
||||
|
||||
dstr_init_copy(&temp, path);
|
||||
dstr_replace(&temp, "\\", "/");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user