]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1926110, r1926111 from trunk:
authorRuediger Pluem <rpluem@apache.org>
Mon, 7 Jul 2025 10:18:22 +0000 (10:18 +0000)
committerRuediger Pluem <rpluem@apache.org>
Mon, 7 Jul 2025 10:18:22 +0000 (10:18 +0000)
Correctly check return value of getline

In case of an error (e.g. file not found or readable) getline returns -1 which
causes an endless loop. Leave the loop in such cases.

* Correctly handle filenames that contain spaces

Reviewed by: rpluem, ylavic, jorton

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1927027 13f79535-47bb-0310-9956-ffa450edef68

Makefile.in
STATUS

index ebf7a1660f96ac55c678a6eaba74e4039ce9d94a..11fbb20d95dcf7950551e68b5fc1416225d3bb6f 100644 (file)
@@ -156,19 +156,19 @@ docs:
        fi
 
 update-changes:
-       @for i in `find changes-entries -type f`; do \
+       @find changes-entries -type f | while read -r i ; do \
            cp CHANGES CHANGES.tmp ; \
-           awk -v fname=$$i 'BEGIN{done = 0; active = 0} \
+           awk -v fname="$$i" 'BEGIN{done = 0; active = 0} \
                            done == 0 && active == 0 && /^Changes with Apache /{ active = 1; print; next}; \
-                           /^( *\*|Changes with Apache )/ && active == 1 && done == 0{rec=$$0; while(getline<fname){if (! ($$0 ~ /^ *$$/)){print}}printf "\n";print rec; active = 0; done = 1; next} //;' \
+                           /^( *\*|Changes with Apache )/ && active == 1 && done == 0{rec=$$0; while((getline<fname) > 0){if (! ($$0 ~ /^ *$$/)){print}}printf "\n";print rec; active = 0; done = 1; next} //;' \
            CHANGES.tmp > CHANGES ; \
            rm CHANGES.tmp ; \
            if [ -n "$(SVN)" ] ; then \
-               if ! $(SVN) rm $$i 2>/dev/null ; then \
-                   $(RM) $$i ; \
+               if ! $(SVN) rm "$$i" 2>/dev/null ; then \
+                   $(RM) "$$i" ; \
                fi ; \
            else \
-               $(RM) $$i ; \
+               $(RM) "$$i" ; \
            fi ; \
        done ; \
        if [ -n "$(SVN)" ] ; then \
diff --git a/STATUS b/STATUS
index 3dc93f3cb66a7c24806eab93c6023e35aa6bdaf3..3cb3b7b58b51e4e6372c03b109034389dfeff16f 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -158,15 +158,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) Makefile.in: Correctly deal with change entries whose filenames contain
-     spaces.
-     Trunk version of patch:
-        https://svn.apache.org/r1926110
-        https://svn.apache.org/r1926111
-     Backport version for 2.4.x of patch:
-      Trunk version of patch works
-      svn merge -c 1926110,1926111 ^/httpd/httpd/trunk .
-     +1: rpluem, ylavic, jorton
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]