aboutsummaryrefslogtreecommitdiffstats
path: root/main/sqlite/CVE-2019-19242.patch
blob: d4e9fab4f6f969ec8c101b796ca26fb80eeba39d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/sqlite3.c b/sqlite3.c
index c607252..968ffb0 100644
--- a/sqlite3.c
+++ b/sqlite3.c
@@ -99174,7 +99174,12 @@ expr_code_doover:
         ** constant.
         */
         int iReg = sqlite3ExprCodeTarget(pParse, pExpr->pLeft,target);
-        int aff = sqlite3TableColumnAffinity(pExpr->pTab, pExpr->iColumn);
+        int aff;
+        if( pExpr->pTab ){
+          aff = sqlite3TableColumnAffinity(pExpr->pTab, pExpr->iColumn);
+        }else{
+          aff = pExpr->affinity;
+        }
         if( aff!=SQLITE_AFF_BLOB ){
           static const char zAff[] = "B\000C\000D\000E";
           assert( SQLITE_AFF_BLOB=='A' );