svn commit: r1935002 - httpd/httpd/trunk/modules/generators

[email protected] Fri, 05 Jun 2026 09:45:07 -0000
Newsgroups gmane.comp.apache.cvs
Message-ID <178065270785.3050657.9924564449268102535@svn03-he-fi>
Author: jorton
Date: Fri Jun  5 09:45:07 2026
New Revision: 1935002

Log:
* modules/generators/mod_autoindex.c (add_header): Reject invalid
  NameWidth values less than 5, including zero.

Submitted by: metsw24-max <metsw24 gmail.com>
GitHub: closes #617

Modified:
   httpd/httpd/trunk/modules/generators/mod_autoindex.c

Modified: httpd/httpd/trunk/modules/generators/mod_autoindex.c
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_autoindex.c	Fri Jun  5 09:36:25 2026	(r1935001)
+++ httpd/httpd/trunk/modules/generators/mod_autoindex.c	Fri Jun  5 09:45:07 2026	(r1935002)
@@ -462,8 +462,8 @@ static const char *add_opts(cmd_parms *c
             else {
                 int width = atoi(&w[10]);
 
-                if (width && (width < 5)) {
-                    return "NameWidth value must be greater than 5";
+                if (width < 5) {
+                    return "NameWidth value must be at least 5";
                 }
                 d_cfg->name_width = width;
                 d_cfg->name_adjust = K_NOADJUST;