Skip to content

Conversation

Mytherin
Copy link
Collaborator

The loop above defines the following condition:

while (posOut+32 <= size && posIn+4 <= lenIn)

i.e. we break either if we are reaching the end of the output buffer, OR we only have three bytes remaining in the input buffer.

We then check if we have three bytes remaining as follows:

if (posOut+24 <= size) { // handle the possibly 3 last bytes without a loop

This is incorrect, it should be the same as the condition above.

@Mytherin Mytherin merged commit 1378dcc into duckdb:v1.2-histrionicus Mar 18, 2025
48 checks passed
@Mytherin Mytherin deleted the fsstfix branch April 2, 2025 09:23
krlmlr added a commit to duckdb/duckdb-r that referenced this pull request Apr 8, 2025
FSST Fix: Correctly detect the situation where we have 3 bytes remaining (duckdb/duckdb#16688)
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.

1 participant