Skip to content

Commit 3e7710c

Browse files
committed
lexbor: Cherry pick "URL: fixed "heap-buffer-overflow" for scheme is "file"."
see lexbor/lexbor@65435d3 Fixes php#20668
1 parent a3454b8 commit 3e7710c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ PHP NEWS
1313
- LDAP:
1414
. Fix memory leak in ldap_set_options(). (ndossche)
1515

16+
- Lexbor:
17+
. Fixed bug GH-20668 (\Uri\WhatWg\Url::withHost() crashes (SEGV) for URLs
18+
using the file: scheme). (lexborisov)
1619

1720
18 Dec 2025, PHP 8.5.1
1821

ext/lexbor/lexbor/url/url.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1817,7 +1817,6 @@ lxb_url_parse_basic_h(lxb_url_parser_t *parser, lxb_url_t *url,
18171817
if (override_state != LXB_URL_STATE__UNDEF
18181818
&& url->scheme.type == LXB_URL_SCHEMEL_TYPE_FILE)
18191819
{
1820-
p -= 1;
18211820
state = LXB_URL_STATE_FILE_HOST_STATE;
18221821
goto again;
18231822
}

0 commit comments

Comments
 (0)