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 server crash when receiving the empty inline command #1909

Merged
merged 2 commits into from
Nov 24, 2023

Conversation

git-hulk
Copy link
Member

@git-hulk git-hulk commented Nov 24, 2023

Currently, we didn't check if the token array is empty before using it,
so it will crash if receive a request with a query like \r\n.
This only happens in the inline command situation since the multi-bulk protocol
will ignore the request if the length is <= 0.

This fixes #1908

Currently, we didn't check if the token array is empty before using,
so it will be crashed if recevied a request with the query like ` \r\n`.
This only happens on the inline command situation since the multi-bulk
protocol will ignore the request if the length is <= 0.
Copy link

sonarcloud bot commented Nov 24, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
2.7% 2.7% Duplication

@git-hulk git-hulk merged commit db4669a into apache:unstable Nov 24, 2023
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug type bug crash type crash
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ooops! kvrocks version 2.6.0 (commit cac0ade4) got signal: Segmentation fault (11)
4 participants