From 09bfde1eb9b70cd32b8ca3c1cc9742d661277e3d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 11 Dec 2024 09:49:13 -0500 Subject: Fix potential null dereferences --- src/path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/path.c') diff --git a/src/path.c b/src/path.c index 8d68781..7e67af6 100644 --- a/src/path.c +++ b/src/path.c @@ -697,7 +697,7 @@ zix_path_is_absolute(const char* const path) { #ifdef _WIN32 const ZixRootSlices root = zix_path_root_slices(path); - return (!zix_is_empty_range(root.name) && + return (path && !zix_is_empty_range(root.name) && (!zix_is_empty_range(root.dir) || (is_dir_sep(path[0]) && is_dir_sep(path[1])))); -- cgit v1.2.1