Skip to content

Fix infinite loop in BrotliEncoder#263

Merged
hadashiA merged 3 commits intomainfrom
hadashiA/fix-brotli-infinite-loop
Mar 21, 2024
Merged

Fix infinite loop in BrotliEncoder#263
hadashiA merged 3 commits intomainfrom
hadashiA/fix-brotli-infinite-loop

Conversation

@hadashiA
Copy link
Copy Markdown
Contributor

Fix #254

writtenNotAdvanced = CompressCore(ref encoder, item.Span, ref memoryPackWriter, initialLength: null, isFinalBlock: false);
var span = item.Span;
if (span.Length <= 0) continue;
bytesWritten += CompressCore(ref encoder, item.Span, ref memoryPackWriter, initialLength: null, isFinalBlock: false);
Copy link
Copy Markdown
Member

@neuecc neuecc Mar 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

item.Span -> span

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:fixed:

@hadashiA hadashiA merged commit f9aaa81 into main Mar 21, 2024
@hadashiA hadashiA deleted the hadashiA/fix-brotli-infinite-loop branch March 21, 2024 06:05
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.

BrotliCompressor.CompressCore rare case

2 participants