mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-02 05:54:29 +03:00
Changes to avoid undefined behavior in memset() and memcpy() and in the
comparisons of pointers from different allocations. All problems are found by analysis tools - none have been seen in the wild. FossilOrigin-Name: 901d0b8f3b72e96ffa8e9436993a12980f5ebd51
This commit is contained in:
@@ -3237,7 +3237,7 @@ u32 sqlite3VdbeSerialPut(u8 *buf, Mem *pMem, u32 serial_type){
|
||||
assert( pMem->n + ((pMem->flags & MEM_Zero)?pMem->u.nZero:0)
|
||||
== (int)sqlite3VdbeSerialTypeLen(serial_type) );
|
||||
len = pMem->n;
|
||||
memcpy(buf, pMem->z, len);
|
||||
if( len>0 ) memcpy(buf, pMem->z, len);
|
||||
return len;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user