René's URL Explorer Experiment


Title: Large InputStreams cause negative index fault · Issue #124 · json-iterator/java · GitHub

Open Graph Title: Large InputStreams cause negative index fault · Issue #124 · json-iterator/java

X Title: Large InputStreams cause negative index fault · Issue #124 · json-iterator/java

Description: The code attempts to increase the size of the buffer with a 2x multiplier until no further bytes are available. I have some concerns about this (but no concrete solution) because this in-memory approach is not a true stream. But, that as...

Open Graph Description: The code attempts to increase the size of the buffer with a 2x multiplier until no further bytes are available. I have some concerns about this (but no concrete solution) because this in-memory app...

X Description: The code attempts to increase the size of the buffer with a 2x multiplier until no further bytes are available. I have some concerns about this (but no concrete solution) because this in-memory app...

Opengraph URL: https://github.com/json-iterator/java/issues/124

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Large InputStreams cause negative index fault","articleBody":"The code attempts to increase the size of the buffer with a 2x multiplier until no further bytes are available.  I have some concerns about this (but no concrete solution) because this in-memory approach is not a true stream.  But, that aside, the following code within keepSkippedBytesThenRead(...) causes a problem:\r\n\r\nbyte[] newBuf = new byte[iter.buf.length * 2];\r\n\r\nThis leads to rapid increases in memory allocation for the buffer.  When processing a large input you can easily roll to a negative integer and then you will obviously end up with an allocation error as the length is negative.  A better approach, which I'll check in shortly, is to only increase the length of the byte array by the increment of the initially provided size in the JsonIter.parse(...). A more meaningful error than the negative index is also advised.","author":{"url":"https://github.com/ahantke","@type":"Person","name":"ahantke"},"datePublished":"2017-11-14T01:16:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/124/java/issues/124"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:f2052870-6dec-9000-f9d6-04450cbedef3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBBDA:154180:1AF2246:2362D12:696B34EF
html-safe-nonce4b1d24e6c4bf5a7ec330b3accc9b4f0ad3c23fb9afcb3c41d0c503e69d597e48
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQkRBOjE1NDE4MDoxQUYyMjQ2OjIzNjJEMTI6Njk2QjM0RUYiLCJ2aXNpdG9yX2lkIjoiNTY4MDc2NTQ4MTEwMjU1NDM1MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac4e8aff42955738adff8a9fda466b65771d4dcb73f6ceb02f921ae6758dae1641
hovercard-subject-tagissue:273634806
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/json-iterator/java/124/issue_layout
twitter:imagehttps://opengraph.githubassets.com/0163fd91125308f04bd716f95bba21ade0c1c4d5fe1481ef413585bbe52781e3/json-iterator/java/issues/124
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0163fd91125308f04bd716f95bba21ade0c1c4d5fe1481ef413585bbe52781e3/json-iterator/java/issues/124
og:image:altThe code attempts to increase the size of the buffer with a 2x multiplier until no further bytes are available. I have some concerns about this (but no concrete solution) because this in-memory app...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameahantke
hostnamegithub.com
expected-hostnamegithub.com
None5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d
turbo-cache-controlno-preview
go-importgithub.com/json-iterator/java git https://github.com/json-iterator/java.git
octolytics-dimension-user_id24260074
octolytics-dimension-user_loginjson-iterator
octolytics-dimension-repository_id75621695
octolytics-dimension-repository_nwojson-iterator/java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id75621695
octolytics-dimension-repository_network_root_nwojson-iterator/java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release82560a55c6b2054555076f46e683151ee28a19bc
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/json-iterator/java/issues/124#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjson-iterator%2Fjava%2Fissues%2F124
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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%2Fjson-iterator%2Fjava%2Fissues%2F124
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%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=json-iterator%2Fjava
Reloadhttps://github.com/json-iterator/java/issues/124
Reloadhttps://github.com/json-iterator/java/issues/124
Reloadhttps://github.com/json-iterator/java/issues/124
json-iterator https://github.com/json-iterator
javahttps://github.com/json-iterator/java
Notifications https://github.com/login?return_to=%2Fjson-iterator%2Fjava
Fork 530 https://github.com/login?return_to=%2Fjson-iterator%2Fjava
Star 1.6k https://github.com/login?return_to=%2Fjson-iterator%2Fjava
Code https://github.com/json-iterator/java
Issues 85 https://github.com/json-iterator/java/issues
Pull requests 29 https://github.com/json-iterator/java/pulls
Actions https://github.com/json-iterator/java/actions
Projects 0 https://github.com/json-iterator/java/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/json-iterator/java/security
Please reload this pagehttps://github.com/json-iterator/java/issues/124
Insights https://github.com/json-iterator/java/pulse
Code https://github.com/json-iterator/java
Issues https://github.com/json-iterator/java/issues
Pull requests https://github.com/json-iterator/java/pulls
Actions https://github.com/json-iterator/java/actions
Projects https://github.com/json-iterator/java/projects
Security https://github.com/json-iterator/java/security
Insights https://github.com/json-iterator/java/pulse
New issuehttps://github.com/login?return_to=https://github.com/json-iterator/java/issues/124
New issuehttps://github.com/login?return_to=https://github.com/json-iterator/java/issues/124
Large InputStreams cause negative index faulthttps://github.com/json-iterator/java/issues/124#top
https://github.com/ahantke
https://github.com/ahantke
ahantkehttps://github.com/ahantke
on Nov 14, 2017https://github.com/json-iterator/java/issues/124#issue-273634806
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.