Skip to content

fix OFF_MAX redefinition and a potential overflow#286

Merged
mity merged 1 commit intomity:masterfrom
acmepjz:acmepjz_fix_off_max
Apr 16, 2026
Merged

fix OFF_MAX redefinition and a potential overflow#286
mity merged 1 commit intomity:masterfrom
acmepjz:acmepjz_fix_off_max

Conversation

@acmepjz
Copy link
Copy Markdown
Contributor

@acmepjz acmepjz commented Jun 11, 2025

This addresses first two points of issue #281.

  • Since OFF_MAX is not used in the code at all, I just remove it.
  • SZ_MAX is used only at one place in the code, and 1024 * 1024 is always smaller than it, so it seems redundant.
  • 16 * size could overflow, which makes the MIN returns 0 which is unwanted. I've changed the code such that if that happens, it also returns 1024 * 1024.

@mity mity merged commit 1ccedb3 into mity:master Apr 16, 2026
@acmepjz acmepjz deleted the acmepjz_fix_off_max branch April 16, 2026 19:45
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.

2 participants