From c3dc504dba51c69bf0df1b5fdfaf980409bb6143 Mon Sep 17 00:00:00 2001 From: Chip Black Date: Thu, 2 Jan 2014 04:30:36 -0600 Subject: [PATCH 1/1] Check paths in blerglatest --- tools/blerglatest.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/blerglatest.c b/tools/blerglatest.c index c0279af..eaf887e 100644 --- a/tools/blerglatest.c +++ b/tools/blerglatest.c @@ -83,6 +83,11 @@ struct things * latest_things(const char *path, const char *file, int minlen) { int i; d = opendir(path); + if (d == NULL) { + fprintf(stderr, "Could not open %s: ", path); + perror(""); + exit(1); + } while (f = readdir(d)) { if (f->d_name[0] == '.') continue; if (minlen > 0 && strlen(f->d_name) < minlen) continue; -- 2.25.1