summaryrefslogtreecommitdiffstats
path: root/src/path.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-12-11 09:49:13 -0500
committerDavid Robillard <d@drobilla.net>2024-12-11 10:06:33 -0500
commit09bfde1eb9b70cd32b8ca3c1cc9742d661277e3d (patch)
tree61c3764fac49ed8623cd56c821804cd00e5be374 /src/path.c
parent158e199d0dbc54fe497a53b167c880a8c85a9017 (diff)
downloadzix-09bfde1eb9b70cd32b8ca3c1cc9742d661277e3d.tar.gz
zix-09bfde1eb9b70cd32b8ca3c1cc9742d661277e3d.tar.bz2
zix-09bfde1eb9b70cd32b8ca3c1cc9742d661277e3d.zip
Fix potential null dereferences
Diffstat (limited to 'src/path.c')
-rw-r--r--src/path.c2
1 files changed, 1 insertions, 1 deletions
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]))));