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: handle null length strings in stored commands #2518

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

dranikpg
Copy link
Contributor

@dranikpg dranikpg commented Feb 1, 2024

Fixes #2509

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
romange
romange previously approved these changes Feb 1, 2024
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
@dranikpg
Copy link
Contributor Author

dranikpg commented Feb 1, 2024

Change: Don't store null terminated strings in StoredCmd because we can pass a tightly-packed buffer to it. Is there any place where we rely on arguments being null terminated?

@romange
Copy link
Collaborator

romange commented Feb 1, 2024

Change: Don't store null terminated strings in StoredCmd because we can pass a tightly-packed buffer to it. Is there any place where we rely on arguments being null terminated?

we should not. I removed this reliance at some point.

@dranikpg dranikpg requested a review from romange February 1, 2024 14:12
@dranikpg dranikpg merged commit c987e64 into dragonflydb:main Feb 1, 2024
7 checks passed
romange pushed a commit that referenced this pull request Feb 3, 2024
* fix: handle null length strings in stored commands

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
@dranikpg dranikpg deleted the fix-empty-storedcmd branch February 6, 2024 19:02
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.

Dragonfly crashes when setting empty string in transaction
2 participants