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 comparing nullslice and empty slice #170

Closed
wants to merge 1 commit into from

Conversation

blaugold
Copy link
Contributor

@blaugold blaugold commented Nov 6, 2022

FLSlice_Equal and FLSlice_Compare handled the nullslice and an empty slice as beeing equal.

This can cause incorrect behaviour in edge cases where the distinction matters. The added tests contains such a case and did fail before this change.

NB: This was discovered through fuzzing (#166).

@snej
Copy link
Contributor

snej commented Jul 19, 2023

I honestly don't recall if this was intentional or not. I worry that changing this behavior could cause regressions in LiteCore or Couchbase Lite.

@snej
Copy link
Contributor

snej commented Jan 26, 2024

I copied the test case in here, "API Mutable copy of Dict with empty string shared key", into the current master version of Fleece and ran it; it passes.

@snej snej closed this Jan 26, 2024
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.

None yet

2 participants