CBL-Mariner/SPECS/sqlite/CVE-2022-46908.patch

36 строки
1.1 KiB
Diff

From 7052d3ee4076f7f69902d32d4947765e41e6e0eb Mon Sep 17 00:00:00 2001
From: Daniel McIlvaney <damcilva@microsoft.com>
Date: Tue, 13 Dec 2022 20:00:29 -0800
Subject: [PATCH] Rework patch cefc032473ac5ad2 to apply to released sources.
Signed-off-by: Daniel McIlvaney <damcilva@microsoft.com>
---
shell.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/shell.c b/shell.c
index e66ae08..d423278 100644
--- a/shell.c
+++ b/shell.c
@@ -12921,7 +12921,7 @@ static int safeModeAuth(
"zipfile",
"zipfile_cds",
};
- UNUSED_PARAMETER(zA2);
+ UNUSED_PARAMETER(zA1);
UNUSED_PARAMETER(zA3);
UNUSED_PARAMETER(zA4);
switch( op ){
@@ -12936,7 +12936,7 @@ static int safeModeAuth(
case SQLITE_FUNCTION: {
int i;
for(i=0; i<ArraySize(azProhibitedFunctions); i++){
- if( sqlite3_stricmp(zA1, azProhibitedFunctions[i])==0 ){
+ if( sqlite3_stricmp(zA2, azProhibitedFunctions[i])==0 ){
failIfSafeMode(p, "cannot use the %s() function in safe mode",
azProhibitedFunctions[i]);
}
--
2.17.1