]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix the sqlite3_load_extension() interface so that it tolerates backslashes
authordrh <drh@noemail.net>
Sat, 25 Apr 2020 21:05:51 +0000 (21:05 +0000)
committerdrh <drh@noemail.net>
Sat, 25 Apr 2020 21:05:51 +0000 (21:05 +0000)
in place of forward-slashes in pathnames on Windows.

FossilOrigin-Name: bc3bf7c6681a96bc18a1ed02f0ccced4731d5dab45f60c347dd1841706e6b62a

manifest
manifest.uuid
src/loadext.c

index 71664328dc72f869f38b8c046a8a474f2043cde7..1eba7662070f5e2107e3945e08f183e3dcd5173b 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Ensure\saffinity\sis\snot\sdiscarded\sfrom\sa\sview\scolumn\sif\sthe\sview\sappears\son\sthe\srhs\sof\sa\sLEFT\sJOIN.\sFix\sfor\s[45f4bf4e].
-D 2020-04-25T15:01:53.394
+C Fix\sthe\ssqlite3_load_extension()\sinterface\sso\sthat\sit\stolerates\sbackslashes\nin\splace\sof\sforward-slashes\sin\spathnames\son\sWindows.
+D 2020-04-25T21:05:51.928
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -495,7 +495,7 @@ F src/hwtime.h cb1d7e3e1ed94b7aa6fde95ae2c2daccc3df826be26fc9ed7fd90d1750ae6144
 F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
 F src/insert.c 8e4211d04eb460c0694d486c6ba1c068d468c6f653c3f237869a802ad82854de
 F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa
-F src/loadext.c 4540fb20e8606b5cea7efee1d727cc69b20390ddc2e6a6c5515e20f96dcc205c
+F src/loadext.c af284e30250a36af92bcf97de743bae57b215c7d3414e3b913b9d8f2e75c5214
 F src/main.c 652a782cd7b6c6ddf7419fcaf06b8aa9440b7c815857241171c9bdf03ab6544c
 F src/malloc.c cabfef0d725e04c8abfe0231a556ed8b78bf329dcc3fddbf903f6cdcd53cf4e6
 F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
@@ -1861,7 +1861,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P b4987a5ced0c0f2c606c040e0c1b8ee11175f40ae35a7446308a43e77b1f1db2
-R 71836ca611d61deceeaf6fb2607af00b
-U dan
-Z f46546e33cf07990942ccd1411251d86
+P ac31edd3eeafcef46164a4506bbc32c711bb7cd78378aeaa4c9bb12524ac5ea1
+R a6c62e244c55732737962b844b2337e6
+U drh
+Z fbfd383a8d39b6b6bd4ef76163a1c79c
index 750cea59af7f0b3968ed8658b607aae4c1e269c0..b967c2d5918a8e4146271f49935df1e31facf26c 100644 (file)
@@ -1 +1 @@
-ac31edd3eeafcef46164a4506bbc32c711bb7cd78378aeaa4c9bb12524ac5ea1
\ No newline at end of file
+bc3bf7c6681a96bc18a1ed02f0ccced4731d5dab45f60c347dd1841706e6b62a
\ No newline at end of file
index 5a661cdc267b4d7d5748e3cf553db2c2f4ab706c..aea06d4a551044de89ae5ebeb00eddd88f5050dc 100644 (file)
@@ -581,7 +581,11 @@ static int sqlite3LoadExtension(
       return SQLITE_NOMEM_BKPT;
     }
     memcpy(zAltEntry, "sqlite3_", 8);
+#if SQLITE_OS_WIN
+    for(iFile=ncFile-1; iFile>=0 && ((c=zFile[iFile]!='/')||c=='\\'); iFile--){}
+#else
     for(iFile=ncFile-1; iFile>=0 && zFile[iFile]!='/'; iFile--){}
+#endif
     iFile++;
     if( sqlite3_strnicmp(zFile+iFile, "lib", 3)==0 ) iFile += 3;
     for(iEntry=8; (c = zFile[iFile])!=0 && c!='.'; iFile++){