mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 01:28:27 +08:00
fix: Functional-notation casting vulnerability fix (#35252)
Fix for issue: https://github.com/milvus-io/milvus/issues/35200
This commit is contained in:
parent
b2cc4b0776
commit
d20d6ea551
@ -90,13 +90,13 @@ InstructionSet::InstructionSet()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// load bitset with flags for function 0x80000001
|
// 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_ECX_ = extdata_[1][2];
|
||||||
f_81_EDX_ = extdata_[1][3];
|
f_81_EDX_ = extdata_[1][3];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Interpret CPU brand string if reported
|
// 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, extdata_[2].data(), sizeof(cpui));
|
||||||
memcpy(brand + 16, extdata_[3].data(), sizeof(cpui));
|
memcpy(brand + 16, extdata_[3].data(), sizeof(cpui));
|
||||||
memcpy(brand + 32, extdata_[4].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...) \
|
#define AssertInfo(expr, info, args...) \
|
||||||
do { \
|
do { \
|
||||||
auto _expr_res = bool(expr); \
|
auto _expr_res = static_cast<bool>(expr); \
|
||||||
/* call func only when needed */ \
|
/* call func only when needed */ \
|
||||||
if (!_expr_res) { \
|
if (!_expr_res) { \
|
||||||
milvus::impl::EasyAssertInfo(_expr_res, \
|
milvus::impl::EasyAssertInfo(_expr_res, \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user