fix for bug #393952: crash when I try to VACUUM (StorageUnicodeFunctions::likeFunction() should handle null aArgv[0] and aArgv[1]) r=sdwilsh

This commit is contained in:
sspitzer@mozilla.org 2007-08-27 21:43:10 -07:00
parent ba0a18e1d5
commit 5b0f9d75c4

View File

@ -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<const PRUnichar *>(sqlite3_value_text16(aArgv[1])));
nsDependentString B(static_cast<const PRUnichar *>(sqlite3_value_text16(aArgv[0])));
NS_ASSERTION(!B.IsEmpty(), "LIKE string must not be null!");