Merge pull request #18316 from taosdata/fix/TD-20573

fix: [ASAN] devive by zero
This commit is contained in:
dapan1121 2022-11-21 20:36:19 +08:00 committed by GitHub
commit 8552252ff3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -24,6 +24,8 @@ static double tlog2(double v, double base) {
return a;
} else if (isnan(b) || isinf(b)) {
return b;
} else if (b == 0) {
return INFINITY;
} else {
return a / b;
}