The branch main has been updated by khng:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=fb860ed0c52c2c1e7792ef86718620a439663c7f

commit fb860ed0c52c2c1e7792ef86718620a439663c7f
Author:     Ka Ho Ng <k...@freebsd.org>
AuthorDate: 2024-03-25 20:10:42 +0000
Commit:     Ka Ho Ng <k...@freebsd.org>
CommitDate: 2024-03-25 20:11:42 +0000

    libfetch: parse scheme://domain:/ correctly
    
    This improves URL-parsing compability with cURL, and unbreaks parsing of
    similar kinds of URLs after commit 8d9de5b10a24.
    
    Sponsored by:   Juniper Networks, Inc.
    Reviewed by:    des
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D44493
---
 lib/libfetch/fetch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libfetch/fetch.c b/lib/libfetch/fetch.c
index 8fdcc8e8752e..df97bf486f9b 100644
--- a/lib/libfetch/fetch.c
+++ b/lib/libfetch/fetch.c
@@ -426,7 +426,7 @@ fetchParseURL(const char *URL)
                                goto ouch;
                        }
                }
-               if (n < 1 || n > IPPORT_MAX)
+               if (p != q && (n < 1 || n > IPPORT_MAX))
                        goto ouch;
                u->port = n;
                p = q;

Reply via email to