René's URL Explorer Experiment


Title: Off-by-one crash in TIFF parsing · Issue #562 · treeform/pixie · GitHub

Open Graph Title: Off-by-one crash in TIFF parsing · Issue #562 · treeform/pixie

X Title: Off-by-one crash in TIFF parsing · Issue #562 · treeform/pixie

Description: https://github.com/treeform/pixie/blob/master/src/pixie/fileformats/tiff.nim#L232-L239 The code accepts colorMapIndex == colorMap.len, then indexes colorMap[colorMapIndex]. That is an off-by-one parser bug: malformed palette TIFFs can es...

Open Graph Description: https://github.com/treeform/pixie/blob/master/src/pixie/fileformats/tiff.nim#L232-L239 The code accepts colorMapIndex == colorMap.len, then indexes colorMap[colorMapIndex]. That is an off-by-one pa...

X Description: https://github.com/treeform/pixie/blob/master/src/pixie/fileformats/tiff.nim#L232-L239 The code accepts colorMapIndex == colorMap.len, then indexes colorMap[colorMapIndex]. That is an off-by-one pa...

Opengraph URL: https://github.com/treeform/pixie/issues/562

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Off-by-one crash in TIFF parsing","articleBody":"https://github.com/treeform/pixie/blob/master/src/pixie/fileformats/tiff.nim#L232-L239\n\nThe code accepts `colorMapIndex == colorMap.len`, then indexes `colorMap[colorMapIndex]`. That is an off-by-one parser bug: malformed palette TIFFs can escape normal validation and crash with an unhandled `IndexDefect` instead of returning `PixieError`.\n\n```nim\n# Run: nim r --path:src pocs/tiff_colormap_off_by_one.nim\nimport pixie/fileformats/tiff\n\nproc addLe16(data: var string, value: int) =\n  data.add(char(value and 0xff))\n  data.add(char((value shr 8) and 0xff))\n\nproc addLe32(data: var string, value: int) =\n  data.add(char(value and 0xff))\n  data.add(char((value shr 8) and 0xff))\n  data.add(char((value shr 16) and 0xff))\n  data.add(char((value shr 24) and 0xff))\n\nproc addIfdEntry(\n  data: var string,\n  tag, fieldType, numValues, valueOrOffset: int\n) =\n  data.addLe16(tag)\n  data.addLe16(fieldType)\n  data.addLe32(numValues)\n  data.addLe32(valueOrOffset)\n\nconst\n  ifdOffset = 8\n  entryCount = 9\n  colorMapOffset = ifdOffset + 2 + entryCount * 12 + 4\n  pixelDataOffset = colorMapOffset + 6\n\nvar payload = \"\"\npayload.add(\"II\")\npayload.addLe16(42)\npayload.addLe32(ifdOffset)\npayload.addLe16(entryCount)\npayload.addIfdEntry(0x0100, 4, 1, 1) # ImageWidth\npayload.addIfdEntry(0x0101, 4, 1, 1) # ImageLength\npayload.addIfdEntry(0x0102, 3, 1, 8) # BitsPerSample\npayload.addIfdEntry(0x0103, 3, 1, 1) # Compression = none\npayload.addIfdEntry(0x0106, 3, 1, 3) # PhotometricInterpretation = palette\npayload.addIfdEntry(0x0111, 4, 1, pixelDataOffset)\npayload.addIfdEntry(0x0116, 4, 1, 1) # RowsPerStrip\npayload.addIfdEntry(0x0117, 4, 1, 1) # StripByteCounts\npayload.addIfdEntry(0x0140, 3, 3, colorMapOffset)\npayload.addLe32(0) # No next IFD.\n\n# One palette entry split into R/G/B planes.\npayload.addLe16(0)\npayload.addLe16(0)\npayload.addLe16(0)\n\n# Pixel value 1 is equal to colorMap.len, so the decoder indexes colorMap[1].\npayload.add(char(0x01))\n\necho \"parsing crafted TIFF with palette index == colorMap.len\"\ndiscard decodeTiff(payload)\n```","author":{"url":"https://github.com/hourianto","@type":"Person","name":"hourianto"},"datePublished":"2026-03-10T13:45:19Z","url":"https://github.com/treeform/pixie/issues/562"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c1f845d6-7675-30dd-f59e-beaf838a17ed
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id98EC:3FA310:51ED97:711774:6B04A13B
html-safe-nonceec3157c1ad77df8747f3e9a702664147b5a2d2b208ea9b758777e30033702909
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OEVDOjNGQTMxMDo1MUVEOTc6NzExNzc0OjZCMDRBMTNCIiwidmlzaXRvcl9pZCI6IjYzOTU1NzI5MDI0NzMwMTU2MTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacf36d01a7082367b9cffe8381e5ad1d86356d4ab5915a6e8bfb223a695797bf18
hovercard-subject-tagissue:4051921815
github-keyboard-shortcutsrepository,source-code,file-tree,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/treeform/pixie/562/issue_layout
twitter:imagehttps://opengraph.githubassets.com/18f45b8b63f7f7367b84fb527a642dc14319c23006861e3e739226ff1e209b95/treeform/pixie/issues/562
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/18f45b8b63f7f7367b84fb527a642dc14319c23006861e3e739226ff1e209b95/treeform/pixie/issues/562
og:image:althttps://github.com/treeform/pixie/blob/master/src/pixie/fileformats/tiff.nim#L232-L239 The code accepts colorMapIndex == colorMap.len, then indexes colorMap[colorMapIndex]. That is an off-by-one pa...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamehourianto
hostnamegithub.com
expected-hostnamegithub.com
None9784b6f42e2d5eac4e394fa88cad134c0dc5b6662b4ff2787a1ed1ef5a96331d
turbo-cache-controlno-preview
go-importgithub.com/treeform/pixie git https://github.com/treeform/pixie.git
octolytics-dimension-user_id125948
octolytics-dimension-user_logintreeform
octolytics-dimension-repository_id314427501
octolytics-dimension-repository_nwotreeform/pixie
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id314427501
octolytics-dimension-repository_network_root_nwotreeform/pixie
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
release3fd14143b75b2af7b76bbd23b069867d091adfcc
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/treeform/pixie/issues/562#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftreeform%2Fpixie%2Fissues%2F562
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftreeform%2Fpixie%2Fissues%2F562
Sign uphttps://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=treeform%2Fpixie
Reloadhttps://github.com/treeform/pixie/issues/562
Reloadhttps://github.com/treeform/pixie/issues/562
Reloadhttps://github.com/treeform/pixie/issues/562
treeformhttps://github.com/treeform
pixiehttps://github.com/treeform/pixie
Codehttps://github.com/treeform/pixie
Issues11 (11)https://github.com/treeform/pixie/issues
Pull requests8 (8)https://github.com/treeform/pixie/pulls
Actionshttps://github.com/treeform/pixie/actions
Projectshttps://github.com/treeform/pixie/projects
Security and qualityhttps://github.com/treeform/pixie/security
Insightshttps://github.com/treeform/pixie/pulse
https://github.com/treeform/pixie
New issuehttps://github.com/login?return_to=https://github.com/treeform/pixie/issues/562
New issuehttps://github.com/login?return_to=https://github.com/treeform/pixie/issues/562
#573https://github.com/treeform/pixie/pull/573
Off-by-one crash in TIFF parsinghttps://github.com/treeform/pixie/issues/562#top
#573https://github.com/treeform/pixie/pull/573
https://github.com/hourianto
houriantohttps://github.com/hourianto
on Mar 10, 2026https://github.com/treeform/pixie/issues/562#issue-4051921815
https://github.com/treeform/pixie/blob/master/src/pixie/fileformats/tiff.nim#L232-L239https://github.com/treeform/pixie/blob/master/src/pixie/fileformats/tiff.nim#L232-L239
treeformhttps://github.com/treeform
completedhttps://github.com/treeform/pixie/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#573https://github.com/treeform/pixie/pull/573
on Apr 30, 2026https://github.com/treeform/pixie/issues/562#event-25043009573
Sign up for freehttps://github.com/signup?return_to=https://github.com/treeform/pixie/issues/562
Sign in to commenthttps://github.com/login?return_to=https://github.com/treeform/pixie/issues/562
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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.