Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/httpd check for scandir() returning -1. should hand...



details:   https://anonhg.NetBSD.org/src/rev/6bbe01b3d4a9
branches:  trunk
changeset: 363504:6bbe01b3d4a9
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Mar 14 05:06:59 2022 +0000

description:
check for scandir() returning -1.  should handle PR#56358.

diffstat:

 libexec/httpd/dir-index-bozo.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 174d985dd1b8 -r 6bbe01b3d4a9 libexec/httpd/dir-index-bozo.c
--- a/libexec/httpd/dir-index-bozo.c    Sun Mar 13 22:18:56 2022 +0000
+++ b/libexec/httpd/dir-index-bozo.c    Mon Mar 14 05:06:59 2022 +0000
@@ -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 @@
                "<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;



Home | Main Index | Thread Index | Old Index