mirror of
https://git.yoctoproject.org/poky
synced 2026-06-30 20:13:39 +02:00
Pick patch [1] listed in [2]. Also pick another patch which is precondition to this one introducing variable needed for the check. [1] https://sqlite.org/src/info/12ad822d9b827777 [2] https://nvd.nist.gov/vuln/detail/CVE-2025-7458 (From OE-Core rev: 4d5093e5103016c08b3a32fd83b1ec9edd87cd5a) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
33 lines
1.2 KiB
Diff
33 lines
1.2 KiB
Diff
From b816ca9994e03a8bc829b49452b8158a731e81a9 Mon Sep 17 00:00:00 2001
|
|
From: drh <>
|
|
Date: Thu, 16 Mar 2023 20:54:29 +0000
|
|
Subject: [PATCH] Correctly handle SELECT DISTINCT ... ORDER BY when all of the
|
|
result set terms are constant and there are more result set terms than ORDER
|
|
BY terms. Fix for these tickets: [c36cdb4afd504dc1], [4051a7f931d9ba24],
|
|
[d6fd512f50513ab7].
|
|
|
|
FossilOrigin-Name: 12ad822d9b827777526ca5ed5bf3e678d600294fc9b5c25482dfff2a021328a4
|
|
|
|
CVE: CVE-2025-7458
|
|
Upstream-Status: Backport [github.com/sqlite/sqlite/commit/b816ca9994e03a8bc829b49452b8158a731e81a9]
|
|
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
|
---
|
|
sqlite3.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/sqlite3.c b/sqlite3.c
|
|
index 19d0438..6d92184 100644
|
|
--- a/sqlite3.c
|
|
+++ b/sqlite3.c
|
|
@@ -156989,6 +156989,10 @@ static int wherePathSolver(WhereInfo *pWInfo, LogEst nRowEst){
|
|
if( pFrom->isOrdered==pWInfo->pOrderBy->nExpr ){
|
|
pWInfo->eDistinct = WHERE_DISTINCT_ORDERED;
|
|
}
|
|
+ if( pWInfo->pSelect->pOrderBy
|
|
+ && pWInfo->nOBSat > pWInfo->pSelect->pOrderBy->nExpr ){
|
|
+ pWInfo->nOBSat = pWInfo->pSelect->pOrderBy->nExpr;
|
|
+ }
|
|
}else{
|
|
pWInfo->nOBSat = pFrom->isOrdered;
|
|
pWInfo->revMask = pFrom->revLoop;
|