1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Fix a case where NULL was being passed to memcmp() following an OOM. This is

probably not a real problem, as the number-of-bytes parameter was passed 0 in
this case, but it was causing a santizer complaint.

FossilOrigin-Name: 3ea2bad27e516d5dbfa4a9cb0c767d6a8387280a7e4bbf2ae80cd318da670d66
This commit is contained in:
dan
2017-05-22 08:04:09 +00:00
parent 78436d4c66
commit 21766c0c16
4 changed files with 16 additions and 15 deletions

View File

@@ -867,6 +867,7 @@ static int binCollFunc(
/* EVIDENCE-OF: R-65033-28449 The built-in BINARY collation compares
** strings byte by byte using the memcmp() function from the standard C
** library. */
assert( pKey1 && pKey2 );
rc = memcmp(pKey1, pKey2, n);
if( rc==0 ){
if( padFlag