From 3528b0de3aa5fefc4cb91599c920e2c9d6c2ffc3 Mon Sep 17 00:00:00 2001
From: yanglongkang <yanglongkang@huawei.com>
Date: Thu, 11 Jun 2020 19:21:35 +0000
Subject: [PATCH] sqlite: fix CVE-2020-13630

Fix a use-after-free bug in the fts3 snippet() function.
https://sqlite.org/src/info/0d69f76f0865f962

Signed-off-by: dan <dan@noemail.net>
Signed-off-by: yanglongkang <yanglongkang@huawei.com>
---
 ext/fts3/fts3.c | 1 +
 1 file changed, 1 insertion(+)

diff -Naur e/ext/fts3/fts3.c f/ext/fts3/fts3.c
--- e/ext/fts3/fts3.c	2020-06-23 03:05:29.962000000 +0000
+++ f/ext/fts3/fts3.c	2020-06-23 03:25:15.587000000 +0000
@@ -5192,6 +5192,7 @@
                 fts3EvalNextRow(pCsr, pLeft, pRc);
               }
             }
+	    pRight->bEof = pLeft->bEof = 1;
           }
         }
         break;
