mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Fix all known instances of signed-integer overflow. Within SQL expressions,
integer overflow now forces coercion to floating point. The shift operators work with any integer right-hand operand with negative values reversing the direction of the shift. FossilOrigin-Name: abf21394124a0af46f072793718964cee2ce55d0
This commit is contained in:
@@ -400,7 +400,11 @@ void sqlite3VXPrintf(
|
||||
v = va_arg(ap,int);
|
||||
}
|
||||
if( v<0 ){
|
||||
longvalue = -v; /* CLANG */
|
||||
if( v==SMALLEST_INT64 ){
|
||||
longvalue = ((u64)1)<<63;
|
||||
}else{
|
||||
longvalue = -v;
|
||||
}
|
||||
prefix = '-';
|
||||
}else{
|
||||
longvalue = v;
|
||||
|
||||
Reference in New Issue
Block a user