Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix integer overflow when format command larger than 4GB #1030

Merged
merged 1 commit into from
Dec 22, 2021

Conversation

sundb
Copy link
Contributor

@sundb sundb commented Dec 16, 2021

See https://groups.google.com/g/redis-db/c/loPFJAqDIgI/m/GfmBKX4gDAAJ?utm_medium=email&utm_source=footer.

This PR mainly fixes two integer overflow.

  1. When command arg is larger than 4GB, hi_sdscatfmt should use %U, not %u.
  2. When the command is larger than 4GB, the return type of redisFormatSdsCommandArgv should be long long.

@michael-grunder michael-grunder merged commit f2be748 into redis:master Dec 22, 2021
@michael-grunder
Copy link
Collaborator

Merged, thanks!

@sundb sundb deleted the fix-format-4gb-command branch December 23, 2021 01:31
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