projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ecd67e
)
glob-util: add assert to silence coverity
author
Luca Boccassi
<bluca@debian.org>
Sat, 15 Jul 2023 23:44:46 +0000
(
00:44
+0100)
committer
Luca Boccassi
<bluca@debian.org>
Sat, 15 Jul 2023 23:44:46 +0000
(
00:44
+0100)
CID#
1491968
src/basic/glob-util.c
patch
|
blob
|
history
diff --git
a/src/basic/glob-util.c
b/src/basic/glob-util.c
index fd60a6eda2d085c298ed4d11d7cf75426f09f292..802ca8c655fc24b92728a7bfa0b04209381cad05 100644
(file)
--- a/
src/basic/glob-util.c
+++ b/
src/basic/glob-util.c
@@
-63,6
+63,8
@@
int glob_first(const char *path, char **ret_first) {
return k;
if (ret_first) {
+ assert(g.gl_pathv && g.gl_pathv[0]);
+
char *first = strdup(g.gl_pathv[0]);
if (!first)
return log_oom_debug();