Skip to content

Conversation

@braddunbar
Copy link
Contributor

stringLen can never be 0 here because it was checked in the while condition.

@antirez antirez merged commit 2e2f57e into redis:unstable May 6, 2020
@antirez
Copy link
Contributor

antirez commented May 6, 2020

Thanks @braddunbar, merged. Indeed the conditional is not needed. Moreover as I opened the file, I did a quick review and found two issues fixed in e17f931: this code was converted from code that was using C strings and called strlen() to get the length of the two strings. However in the new form, there is no guarantee that the strings will be null terminated (even if we probably call the code always with null terminated stings).

@braddunbar braddunbar deleted the stringmatchlen branch May 6, 2020 17:24
JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request May 15, 2020
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