diff options
| author | mrg <mrg@NetBSD.org> | 2022-03-14 05:06:59 +0000 |
|---|---|---|
| committer | mrg <mrg@NetBSD.org> | 2022-03-14 05:06:59 +0000 |
| commit | 2bed792d883e0a017e4c90763fbab3d3eed41fc1 (patch) | |
| tree | eb4ebcfe8333e292a13a14e0b0575e0c9756766f /libexec/httpd | |
| parent | a2b6953d30eb2577a7007706cf66c8c21c8a12e9 (diff) | |
check for scandir() returning -1. should handle PR#56358.
Diffstat (limited to 'libexec/httpd')
| -rw-r--r-- | libexec/httpd/dir-index-bozo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/httpd/dir-index-bozo.c b/libexec/httpd/dir-index-bozo.c index 7afa0836059..aa13f34a1c4 100644 --- a/libexec/httpd/dir-index-bozo.c +++ b/libexec/httpd/dir-index-bozo.c @@ -1,4 +1,4 @@ -/* $NetBSD: dir-index-bozo.c,v 1.34 2020/10/15 02:19:23 mrg Exp $ */ +/* $NetBSD: dir-index-bozo.c,v 1.35 2022/03/14 05:06:59 mrg Exp $ */ /* $eterna: dir-index-bozo.c,v 1.20 2011/11/18 09:21:15 mrg Exp $ */ @@ -141,7 +141,7 @@ bozo_dir_index(bozo_httpreq_t *request, const char *dirpath, int isindex) "<tbody>\r\n"); for (j = k = scandir(dirpath, &de, NULL, alphasort), deo = de; - j--; de++) { + j-- > 0; de++) { int nostat = 0; char *name = (*de)->d_name; char *urlname, *htmlname; |
