1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Fix minor problems with passing NULL pointers to memcmp() and memcpy() found by -fsanitize=undefined.

FossilOrigin-Name: 0b06ce6d8e7cff5cd5d467a94522dfef5593d7c26663ce03c2c2b663a2641551
This commit is contained in:
dan
2018-03-23 16:31:34 +00:00
parent 4aafe5957d
commit 3f2cebb6b4
4 changed files with 15 additions and 13 deletions

View File

@ -839,7 +839,7 @@ static int sessionPreupdateEqual(
}else{
z = sqlite3_value_blob(pVal);
}
if( memcmp(a, z, n) ) return 0;
if( n>0 && memcmp(a, z, n) ) return 0;
a += n;
}
}