summaryrefslogtreecommitdiffstats
path: root/third_party/sqlite/icu-regexp.patch
blob: cb758ce062a3dc6a0112ace3cdd136c18c7f8274 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--- ext/icu/icu.c.orig	2009-12-16 15:43:51.000000000 -0800
+++ ext/icu/icu.c	2009-12-15 15:23:34.000000000 -0800
@@ -250,12 +250,12 @@
   UErrorCode status = U_ZERO_ERROR;
   URegularExpression *pExpr;
   UBool res;
-  const UChar *zString = sqlite3_value_text16(apArg[1]);
+  const UChar *zString;
 
   /* If the left hand side of the regexp operator is NULL, 
   ** then the result is also NULL. 
   */
-  if( !zString ){
+  if( nArg<2 || !(zString=sqlite3_value_text16(apArg[1])) ){
     return;
   }