From b9976d5426c1b55b0104908b69707d0f4300fb11 Mon Sep 17 00:00:00 2001 From: "sspitzer%mozilla.org" Date: Tue, 28 Aug 2007 04:43:10 +0000 Subject: [PATCH] fix for bug #393952: crash when I try to VACUUM (StorageUnicodeFunctions::likeFunction() should handle null aArgv[0] and aArgv[1]) r=sdwilsh --- storage/src/mozStorageUnicodeFunctions.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/storage/src/mozStorageUnicodeFunctions.cpp b/storage/src/mozStorageUnicodeFunctions.cpp index d6dd55a042d..bfc172b2c47 100644 --- a/storage/src/mozStorageUnicodeFunctions.cpp +++ b/storage/src/mozStorageUnicodeFunctions.cpp @@ -188,6 +188,9 @@ StorageUnicodeFunctions::likeFunction(sqlite3_context *p, return; } + if (!sqlite3_value_text16(aArgv[0]) || !sqlite3_value_text16(aArgv[1])) + return; + nsDependentString A(static_cast(sqlite3_value_text16(aArgv[1]))); nsDependentString B(static_cast(sqlite3_value_text16(aArgv[0]))); NS_ASSERTION(!B.IsEmpty(), "LIKE string must not be null!");