mirror of
https://onedev.site.tesses.net/tesses-framework
synced 2026-02-08 15:55:46 +00:00
Update sqlite to fix CVE-2025-6965
This commit is contained in:
@@ -69,7 +69,7 @@ option(TESSESFRAMEWORK_ENABLE_RPATH "Enable RPATH" ON)
|
|||||||
|
|
||||||
if(TESSESFRAMEWORK_ENABLE_SQLITE)
|
if(TESSESFRAMEWORK_ENABLE_SQLITE)
|
||||||
list(APPEND TESSESFRAMEWORK_SOURCE
|
list(APPEND TESSESFRAMEWORK_SOURCE
|
||||||
src/Serialization/sqlite/sqlite3.c
|
src/Serialization/sqlite/sqlite3-mod.c
|
||||||
src/Serialization/sqlite/vfs.c
|
src/Serialization/sqlite/vfs.c
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "TessesFramework/Serialization/SQLite.hpp"
|
#include "TessesFramework/Serialization/SQLite.hpp"
|
||||||
#if defined(TESSESFRAMEWORK_ENABLE_SQLITE)
|
#if defined(TESSESFRAMEWORK_ENABLE_SQLITE)
|
||||||
#include "sqlite/sqlite3.h"
|
#include "sqlite/sqlite3-mod.h"
|
||||||
#endif
|
#endif
|
||||||
namespace Tesses::Framework::Serialization {
|
namespace Tesses::Framework::Serialization {
|
||||||
int SQLiteDatabase::collector(void* user, int count,char** vals, char** keys)
|
int SQLiteDatabase::collector(void* user, int count,char** vals, char** keys)
|
||||||
|
|||||||
8
src/Serialization/sqlite/sqlite3-mod.c
Normal file
8
src/Serialization/sqlite/sqlite3-mod.c
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#if defined(GEKKO) || defined(__SWITCH__)
|
||||||
|
//-DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_WAL -DSQLITE_THREADSAFE=0
|
||||||
|
#define SQLITE_OMIT_LOAD_EXTENSION
|
||||||
|
#define SQLITE_OMIT_WAL
|
||||||
|
#define SQLITE_THREADSAFE 0
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#include "sqlite3.c"
|
||||||
8
src/Serialization/sqlite/sqlite3-mod.h
Normal file
8
src/Serialization/sqlite/sqlite3-mod.h
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
#if defined(GEKKO) || defined(__SWITCH__)
|
||||||
|
//-DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_WAL -DSQLITE_THREADSAFE=0
|
||||||
|
#define SQLITE_OMIT_LOAD_EXTENSION
|
||||||
|
#define SQLITE_OMIT_WAL
|
||||||
|
#define SQLITE_THREADSAFE 0
|
||||||
|
#endif
|
||||||
|
#include "sqlite3.h"
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -366,6 +366,12 @@ struct sqlite3_api_routines {
|
|||||||
/* Version 3.44.0 and later */
|
/* Version 3.44.0 and later */
|
||||||
void *(*get_clientdata)(sqlite3*,const char*);
|
void *(*get_clientdata)(sqlite3*,const char*);
|
||||||
int (*set_clientdata)(sqlite3*, const char*, void*, void(*)(void*));
|
int (*set_clientdata)(sqlite3*, const char*, void*, void(*)(void*));
|
||||||
|
/* Version 3.50.0 and later */
|
||||||
|
int (*setlk_timeout)(sqlite3*,int,int);
|
||||||
|
/* Version 3.51.0 and later */
|
||||||
|
int (*set_errmsg)(sqlite3*,int,const char*);
|
||||||
|
int (*db_status64)(sqlite3*,int,sqlite3_int64*,sqlite3_int64*,int);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -699,6 +705,11 @@ typedef int (*sqlite3_loadext_entry)(
|
|||||||
/* Version 3.44.0 and later */
|
/* Version 3.44.0 and later */
|
||||||
#define sqlite3_get_clientdata sqlite3_api->get_clientdata
|
#define sqlite3_get_clientdata sqlite3_api->get_clientdata
|
||||||
#define sqlite3_set_clientdata sqlite3_api->set_clientdata
|
#define sqlite3_set_clientdata sqlite3_api->set_clientdata
|
||||||
|
/* Version 3.50.0 and later */
|
||||||
|
#define sqlite3_setlk_timeout sqlite3_api->setlk_timeout
|
||||||
|
/* Version 3.51.0 and later */
|
||||||
|
#define sqlite3_set_errmsg sqlite3_api->set_errmsg
|
||||||
|
#define sqlite3_db_status64 sqlite3_api->db_status64
|
||||||
#endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
|
#endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
|
||||||
|
|
||||||
#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
|
#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
|
||||||
|
|||||||
@@ -117,7 +117,7 @@
|
|||||||
|
|
||||||
#if defined(GEKKO) || defined(__SWITCH__)
|
#if defined(GEKKO) || defined(__SWITCH__)
|
||||||
|
|
||||||
#include "sqlite3.h"
|
#include "sqlite3-mod.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user