mirror of https://github.com/milvus-io/milvus.git
fix: Functional-notation casting vulnerability fix (#35252)
Fix for issue: https://github.com/milvus-io/milvus/issues/35200pull/35238/head
parent
b2cc4b0776
commit
d20d6ea551
|
@ -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));
|
||||
|
|
|
@ -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, \
|
||||
|
|
Loading…
Reference in New Issue