We do not correctly check the NULL pointer value of sheepfs_run_cmd, it should be fixed.
Signed-off-by: Ziye Yang <[email protected]> --- sheepfs/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sheepfs/core.c b/sheepfs/core.c index 473cbb5..90a589a 100644 --- a/sheepfs/core.c +++ b/sheepfs/core.c @@ -408,7 +408,7 @@ int main(int argc, char **argv) exit(1); t = sheepfs_run_cmd("dog"); - if (t && !strlen(t->buf)) { + if (!t || (t && !strlen(t->buf))) { fprintf(stderr, "command dog not found\n"); exit(1); } -- sheepdog mailing list [email protected] https://lists.wpkg.org/mailman/listinfo/sheepdog
