1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Avoid ASAN warnings when converting over-sized long double values into double.

FossilOrigin-Name: e989a37ff9d5b52e0090d59be077ad2260c8df5d4c2c2d8088b1160de64dffd4
This commit is contained in:
drh
2023-08-01 19:10:30 +00:00
parent 2877c43e6c
commit cbaef88980
3 changed files with 15 additions and 9 deletions

View File

@@ -591,7 +591,13 @@ do_atof_calc:
while( e<=-10 ){ e+=10; r *= 1.0e-10L; }
while( e<=-1 ){ e+=1; r *= 1.0e-01L; }
}
*pResult = r;
if( r>+1.7976931348623157081452742373e+308L ){
*pResult = +INFINITY;
}else if( r<-1.7976931348623157081452742373e+308L ){
*pResult = -INFINITY;
}else{
*pResult = (double)r;
}
}else{
double rr[2];
u64 s2;