GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — enforce non-negative size in gzip parser · evanw/esbuild@0a9bf21

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • deno
      • mod.ts
    • npm
      • node-install.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/deno/mod.ts‎

Copy file name to clipboardExpand all lines: lib/deno/mod.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ function extractFileFromTarGzip(buffer: Uint8Array, file: string): Uint8Array {
130130
let name = str(offset, 100)
131131
let size = parseInt(str(offset + 124, 12), 8)
132132
offset += 512
133-
if (!isNaN(size)) {
133+
if (!isNaN(size) && size >= 0) {
134134
if (name === file) return buffer.subarray(offset, offset + size)
135135
offset += (size + 511) & ~511
136136
}
Collapse file

‎lib/npm/node-install.ts‎

Copy file name to clipboardExpand all lines: lib/npm/node-install.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function extractFileFromTarGzip(buffer: Buffer, subpath: string): Buffer {
9494
let name = str(offset, 100)
9595
let size = parseInt(str(offset + 124, 12), 8)
9696
offset += 512
97-
if (!isNaN(size)) {
97+
if (!isNaN(size) && size >= 0) {
9898
if (name === subpath) return buffer.subarray(offset, offset + size)
9999
offset += (size + 511) & ~511
100100
}

0 commit comments

Comments
0 (0)
You are visitor 01402605 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.