url: bounds-check short Windows file URL paths · nodejs/node@001c37c · GitHub
Skip to content

Commit 001c37c

Browse files
Archkonaduh95
authored andcommitted
url: bounds-check short Windows file URL paths
Check the decoded pathname length before reading the drive letter and colon. This prevents an out-of-bounds read for short URLs such as file:/// and reports ERR_INVALID_FILE_URL_PATH instead. Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com> PR-URL: #64788 Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com> Reviewed-By: Aviv Keller <me@aviv.sh>
1 parent b5182f0 commit 001c37c

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

src/node_url.cc

Lines changed: 6 additions & 0 deletions

test/cctest/test_path.cc

Lines changed: 24 additions & 0 deletions

0 commit comments

Comments
 (0)