René's URL Explorer Experiment


Title: stream: fix decoded fromList chunk boundary check by watson · Pull Request #61884 · nodejs/node · GitHub

Open Graph Title: stream: fix decoded fromList chunk boundary check by watson · Pull Request #61884 · nodejs/node

X Title: stream: fix decoded fromList chunk boundary check by watson · Pull Request #61884 · nodejs/node

Description: Correct fromList() in decoded string mode to compare n against the current chunk length, not the buffer array length. This prevents over-consuming chunks, which can corrupt readable state and crash with TypeError when mixing setEncoding() and read(n). I reproduced this in all non-EoL release lines. For reference, here's the script I used to make read() throw (usually it throws almost instantly, but a few times it can take a little while): 'use strict' const https = require('node:https') const url = process.argv[2] || 'https://www.google.com' const maxRuns = Number(process.argv[3] || 2000) let runs = 0 function runOnce () { runs++ https.get(url, (res) => { res.setEncoding('utf8') // If this line is removed, the crash doesn't happen. res.on('readable', () => { // Race condition: The call to `res.read(100)` might throw while (res.read(100) !== null) {} }) res.on('end', () => { if (runs >= maxRuns) { console.log(`completed ${runs} runs without crash`) } else { runOnce() } }) }) } console.log(`reproducing with ${url} for up to ${maxRuns} runs...`) runOnce() And here's the output: reproducing with https://www.google.com for up to 2000 runs... node:internal/streams/readable:1650 } else if (n < buf[idx].length) { ^ TypeError: Cannot read properties of undefined (reading 'length') at fromList (node:internal/streams/readable:1650:27) at Readable.read (node:internal/streams/readable:756:11) at IncomingMessage. (/Users/thomas.watson/go/src/github.com/DataDog/dd-trace-js/foo.js:16:18) at IncomingMessage.emit (node:events:508:20) at emitReadable_ (node:internal/streams/readable:837:12) at process.processTicksAndRejections (node:internal/process/task_queues:89:21) Node.js v25.6.1

Open Graph Description: Correct fromList() in decoded string mode to compare n against the current chunk length, not the buffer array length. This prevents over-consuming chunks, which can corrupt readable state and crash...

X Description: Correct fromList() in decoded string mode to compare n against the current chunk length, not the buffer array length. This prevents over-consuming chunks, which can corrupt readable state and crash...

Opengraph URL: https://github.com/nodejs/node/pull/61884

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:f672f7bb-e22d-bd54-f0e2-9917d09a334a
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDC00:163FF7:E2B0F:144522:6A4CC807
html-safe-nonced27987edf7df9df2584b63abf561617263527dd494565428ce5a6618ec9f1c65
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzAwOjE2M0ZGNzpFMkIwRjoxNDQ1MjI6NkE0Q0M4MDciLCJ2aXNpdG9yX2lkIjoiNDc3ODA2ODgwOTgzMDE1NjI5NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacd3dc911a4f3e119193e29915f9199a741fad6d7799e5e1f296e2b42ee2bc10b0
hovercard-subject-tagpull_request:3302382626
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/nodejs/node/pull/61884/files
twitter:imagehttps://avatars.githubusercontent.com/u/10602?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/10602?s=400&v=4
og:image:altCorrect fromList() in decoded string mode to compare n against the current chunk length, not the buffer array length. This prevents over-consuming chunks, which can corrupt readable state and crash...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
released0da0eb92994395299ed4450bf67b0373005be36
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/nodejs/node/pull/61884/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fpull%2F61884%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fpull%2F61884%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/pull/61884/files
Reloadhttps://github.com/nodejs/node/pull/61884/files
Reloadhttps://github.com/nodejs/node/pull/61884/files
Please reload this pagehttps://github.com/nodejs/node/pull/61884/files
nodejs https://github.com/nodejs
nodehttps://github.com/nodejs/node
Please reload this pagehttps://github.com/nodejs/node/pull/61884/files
Notifications https://github.com/login?return_to=%2Fnodejs%2Fnode
Fork 36k https://github.com/login?return_to=%2Fnodejs%2Fnode
Star 118k https://github.com/login?return_to=%2Fnodejs%2Fnode
Code https://github.com/nodejs/node
Issues 1.4k https://github.com/nodejs/node/issues
Pull requests 963 https://github.com/nodejs/node/pulls
Actions https://github.com/nodejs/node/actions
Projects https://github.com/nodejs/node/projects
Security and quality 0 https://github.com/nodejs/node/security
Insights https://github.com/nodejs/node/pulse
Code https://github.com/nodejs/node
Issues https://github.com/nodejs/node/issues
Pull requests https://github.com/nodejs/node/pulls
Actions https://github.com/nodejs/node/actions
Projects https://github.com/nodejs/node/projects
Security and quality https://github.com/nodejs/node/security
Insights https://github.com/nodejs/node/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fnodejs%2Fnode%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fnodejs%2Fnode%2Fissues%2Fnew%2Fchoose
nodejs-github-bothttps://github.com/nodejs-github-bot
nodejs:mainhttps://github.com/nodejs/node/tree/main
watson:fix-readable-stream-bughttps://github.com/watson/node/tree/fix-readable-stream-bug
Conversation 6 https://github.com/nodejs/node/pull/61884
Commits 2 https://github.com/nodejs/node/pull/61884/commits
Checks 54 https://github.com/nodejs/node/pull/61884/checks
Files changed https://github.com/nodejs/node/pull/61884/files
Please reload this pagehttps://github.com/nodejs/node/pull/61884/files
stream: fix decoded fromList chunk boundary check https://github.com/nodejs/node/pull/61884/files#top
Show all changes 2 commits https://github.com/nodejs/node/pull/61884/files
5ef134f stream: fix decoded fromList chunk boundary check watson Feb 19, 2026 https://github.com/nodejs/node/pull/61884/commits/5ef134fce5fb899ff4510e9da41e5d5f2af4b09c
2984f13 fix lint watson Feb 19, 2026 https://github.com/nodejs/node/pull/61884/commits/2984f13162380e6f54d0b91a810f7ff359d44ff0
Clear filters https://github.com/nodejs/node/pull/61884/files
Please reload this pagehttps://github.com/nodejs/node/pull/61884/files
Please reload this pagehttps://github.com/nodejs/node/pull/61884/files
readable.js https://github.com/nodejs/node/pull/61884/files#diff-040c1f5a53844e600d40b33c4624f1fe39fcf2f8d62c76ca3fc5ea5442231469
test-stream2-read-correct-num-bytes-in-utf8.js https://github.com/nodejs/node/pull/61884/files#diff-2a84c83218b4476ed3c8cba69de4a7deca86daeaac38c3ef8c23aefdd8df24ff
lib/internal/streams/readable.jshttps://github.com/nodejs/node/pull/61884/files#diff-040c1f5a53844e600d40b33c4624f1fe39fcf2f8d62c76ca3fc5ea5442231469
View file https://github.com/watson/node/blob/2984f13162380e6f54d0b91a810f7ff359d44ff0/lib/internal/streams/readable.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/61884/{{ revealButtonHref }}
https://github.com/nodejs/node/pull/61884/files#diff-040c1f5a53844e600d40b33c4624f1fe39fcf2f8d62c76ca3fc5ea5442231469
https://github.com/nodejs/node/pull/61884/files#diff-040c1f5a53844e600d40b33c4624f1fe39fcf2f8d62c76ca3fc5ea5442231469
test/parallel/test-stream2-read-correct-num-bytes-in-utf8.jshttps://github.com/nodejs/node/pull/61884/files#diff-2a84c83218b4476ed3c8cba69de4a7deca86daeaac38c3ef8c23aefdd8df24ff
View file https://github.com/watson/node/blob/2984f13162380e6f54d0b91a810f7ff359d44ff0/test/parallel/test-stream2-read-correct-num-bytes-in-utf8.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/61884/{{ revealButtonHref }}
Please reload this pagehttps://github.com/nodejs/node/pull/61884/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.