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

CRC table initialisation is not thread safe #106

Open
ziriax opened this issue Sep 28, 2022 · 0 comments
Open

CRC table initialisation is not thread safe #106

ziriax opened this issue Sep 28, 2022 · 0 comments

Comments

@ziriax
Copy link

ziriax commented Sep 28, 2022

The CRC32 class is not thread safe. It has a static member that is lazily initialized, but no locking is performed. This caused us random PNG files being rejected because of bogus invalid CRCs on chunk.

This is easily solved, either put the table init in a static constructor, or use Lazy<T>

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

No branches or pull requests

1 participant