-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a potential crash while hashing for metrics or LRCLib upload
This isn't so much "fixing a crash that I know can happen" as much as "significantly increasing the defensiveness of this code which appears to cause crashes for some users but which I cannot reproduce". In particular, the docs do not specify that the BCrypt destruction calls will fail when handed a nullptr, but they might. Also because since we weren't zero-initialising the pointer members, they could have had random values that then didn't get overwritten if an error was encountered during initialisation, and then freeing (or doing anything else really) definitely *would* be a problem. Accordingly this *might* fix #419 and #411 but since I can't reproduce the issue myself, there isn't really any way to know for sure.
- Loading branch information
Showing
4 changed files
with
71 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters