diff options
Diffstat (limited to 'test/parser/utils.c')
-rw-r--r-- | test/parser/utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/parser/utils.c b/test/parser/utils.c index 394efb3..c6d1a17 100644 --- a/test/parser/utils.c +++ b/test/parser/utils.c @@ -325,6 +325,9 @@ int parser_scandir(struct discover_context *ctx, const char *dirname, if (f->dev != ctx->device) continue; + if (strlen(f->name) <= strlen(dirname)) + continue; + filename = strrchr(f->name, '/'); if (!filename) continue; |