Skip to content

Fix bugs: humanizeBytes panic, IP range logic, dead code, and error handling#211

Merged
jadolg merged 4 commits intomasterfrom
some-minor-fixes
Mar 27, 2026
Merged

Fix bugs: humanizeBytes panic, IP range logic, dead code, and error handling#211
jadolg merged 4 commits intomasterfrom
some-minor-fixes

Conversation

@jadolg
Copy link
Copy Markdown
Owner

@jadolg jadolg commented Mar 27, 2026

  • server.go: Fix potential index out of bounds panic in humanizeBytes
  • validation.go: Fix lexicographic string comparison in parseIPRange that incorrectly classified 172.2.x.x and 172.3.x.x as private addresses; remove duplicate dead-code block in validateRegistry that was unreachable
  • image.go: Propagate json.Marshal errors in createLayerMetadata, createDockerManifest, and createRepositoriesFile instead of silently writing empty/corrupted data to disk
  • registry.go: Cap error response body reads at 4 KB with io.LimitReader to prevent unbounded memory consumption from a misbehaving registry

@jadolg jadolg merged commit 48333f8 into master Mar 27, 2026
8 checks passed
@jadolg jadolg deleted the some-minor-fixes branch March 27, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant