Merge pull request #44242 from jh0x/fix-use-after-free-blake3

Fixed use-after-free of BLAKE3 error message
This commit is contained in:
Alexey Milovidov 2022-12-17 03:21:16 +03:00 committed by GitHub
commit d7cf0915c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -668,7 +668,7 @@ struct ImplBLAKE3
{
auto err_st = std::string(err_msg);
blake3_free_char_pointer(err_msg);
throw Exception("Function returned error message: " + std::string(err_msg), ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
throw Exception("Function returned error message: " + err_st, ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
}
}
#endif