summary refs log tree commit diff
path: root/pkgs/development/libraries/sqlite
diff options
context:
space:
mode:
authorRyan Burns <rtburns@protonmail.com>2021-08-28 12:39:46 -0700
committerRyan Burns <rtburns@protonmail.com>2021-08-28 12:42:41 -0700
commit5e72b0a076509369f4bca28f3dffd800455299c9 (patch)
tree1653cc259df252749063740f45238b443c6f548e /pkgs/development/libraries/sqlite
parent09818c59fa5bd365fbeae2b4d49567d61546f07a (diff)
downloadnixpkgs-5e72b0a076509369f4bca28f3dffd800455299c9.tar
nixpkgs-5e72b0a076509369f4bca28f3dffd800455299c9.tar.gz
nixpkgs-5e72b0a076509369f4bca28f3dffd800455299c9.tar.bz2
nixpkgs-5e72b0a076509369f4bca28f3dffd800455299c9.tar.lz
nixpkgs-5e72b0a076509369f4bca28f3dffd800455299c9.tar.xz
nixpkgs-5e72b0a076509369f4bca28f3dffd800455299c9.tar.zst
nixpkgs-5e72b0a076509369f4bca28f3dffd800455299c9.zip
fossil: 2.15.1 -> 2.16
For CVE-2021-36377

Add enableDeserialize option to sqlite,
which is required to build fossil v2.16+.
Diffstat (limited to 'pkgs/development/libraries/sqlite')
-rw-r--r--pkgs/development/libraries/sqlite/default.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/development/libraries/sqlite/default.nix b/pkgs/development/libraries/sqlite/default.nix
index e2331d89751..7e53222d0a3 100644
--- a/pkgs/development/libraries/sqlite/default.nix
+++ b/pkgs/development/libraries/sqlite/default.nix
@@ -1,5 +1,6 @@
 { lib, stdenv, fetchurl, zlib, interactive ? false, readline ? null, ncurses ? null
 , python3Packages
+, enableDeserialize ? false
 }:
 
 assert interactive -> readline != null && ncurses != null;
@@ -32,7 +33,7 @@ stdenv.mkDerivation rec {
 
   configureFlags = [ "--enable-threadsafe" ] ++ optional interactive "--enable-readline";
 
-  NIX_CFLAGS_COMPILE = toString [
+  NIX_CFLAGS_COMPILE = toString ([
     "-DSQLITE_ENABLE_COLUMN_METADATA"
     "-DSQLITE_ENABLE_DBSTAT_VTAB"
     "-DSQLITE_ENABLE_JSON1"
@@ -48,7 +49,10 @@ stdenv.mkDerivation rec {
     "-DSQLITE_SECURE_DELETE"
     "-DSQLITE_MAX_VARIABLE_NUMBER=250000"
     "-DSQLITE_MAX_EXPR_DEPTH=10000"
-  ];
+  ] ++ lib.optionals enableDeserialize [
+    # Can be removed in v3.36+, as this will become the default
+    "-DSQLITE_ENABLE_DESERIALIZE"
+  ]);
 
   # Test for features which may not be available at compile time
   preBuild = ''