We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5c4521 commit 3efe5d1Copy full SHA for 3efe5d1
abspath.c
@@ -35,6 +35,9 @@ const char *real_path(const char *path)
35
if (path == buf || path == next_buf)
36
return path;
37
38
+ if (!*path)
39
+ die("The empty string is not a valid path");
40
+
41
if (strlcpy(buf, path, PATH_MAX) >= PATH_MAX)
42
die ("Too long path: %.*s", 60, path);
43
t/t0060-path-utils.sh
@@ -144,7 +144,7 @@ test_expect_success 'absolute path rejects the empty string' '
144
test_must_fail test-path-utils absolute_path ""
145
'
146
147
-test_expect_failure 'real path rejects the empty string' '
+test_expect_success 'real path rejects the empty string' '
148
test_must_fail test-path-utils real_path ""
149
150
0 commit comments