Skip to content

Fix LEB128 encoding for very large int values#400

Merged
mondain merged 1 commit intoRed5:mainfrom
kdkd:cherry-pick-accacb5-20251126-124900
Nov 26, 2025
Merged

Fix LEB128 encoding for very large int values#400
mondain merged 1 commit intoRed5:mainfrom
kdkd:cherry-pick-accacb5-20251126-124900

Conversation

@kdkd
Copy link
Copy Markdown

@kdkd kdkd commented Nov 26, 2025

Commit from kdkd fork accacb5

io/utils/LEB128.java: encode(int) packed the encoded bytes into an int; values requiring 5 bytes (>0x0FFFFFFF) overflow and drop the high byte, producing incorrect LEB128 encodings. Fixed by using the byte-array encoder; throws when an encoding needs more than 4 bytes


values requiring 5 bytes (>0x0FFFFFFF) overflow and drop the high byte,
producing incorrect LEB128 encodings.  Fixed by using the byte-array
encoder; throws when an encoding needs more than 4 bytes
@mondain mondain merged commit f9222d7 into Red5:main Nov 26, 2025
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