fix: Functional-notation casting vulnerability fix (#35252)

Fix for issue: https://github.com/milvus-io/milvus/issues/35200
pull/35238/head
Abdullah Ahmed 2024-08-15 13:50:53 +05:30 committed by GitHub
parent b2cc4b0776
commit d20d6ea551
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -90,13 +90,13 @@ InstructionSet::InstructionSet()
}
// load bitset with flags for function 0x80000001
if (nExIds_ >= (int)0x80000001) {
if (nExIds_ >= static_cast<int>(0x80000001)) {
f_81_ECX_ = extdata_[1][2];
f_81_EDX_ = extdata_[1][3];
}
// Interpret CPU brand string if reported
if (nExIds_ >= (int)0x80000004) {
if (nExIds_ >= static_cast<int>(0x80000004)) {
memcpy(brand, extdata_[2].data(), sizeof(cpui));
memcpy(brand + 16, extdata_[3].data(), sizeof(cpui));
memcpy(brand + 32, extdata_[4].data(), sizeof(cpui));

View File

@ -130,7 +130,7 @@ FailureCStatus(const std::exception* ex) {
#define AssertInfo(expr, info, args...) \
do { \
auto _expr_res = bool(expr); \
auto _expr_res = static_cast<bool>(expr); \
/* call func only when needed */ \
if (!_expr_res) { \
milvus::impl::EasyAssertInfo(_expr_res, \