Skip to content

Commit

Permalink
Fix 'sqlite3_pass_exts' patch compilation on Centos 7
Browse files Browse the repository at this point in the history
  • Loading branch information
JavierJF committed Mar 22, 2024
1 parent 7149369 commit 04866fd
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions deps/sqlite3/sqlite3_pass_exts.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- sqlite3.c 2024-03-22 13:17:43.208309942 +0100
+++ sqlite3-pass-exts.c 2024-03-22 14:00:40.091425564 +0100
@@ -25168,6 +25168,180 @@
--- sqlite3.c 2024-03-22 19:22:47.046093173 +0100
+++ sqlite3-pass-exts.c 2024-03-22 19:24:09.557303716 +0100
@@ -25168,6 +25168,183 @@
sqlite3ResultStrAccum(context, &sRes);
}

Expand Down Expand Up @@ -85,8 +85,9 @@
+ SHA1(hash1, SHA_DIGEST_LENGTH, hash2);
+
+ char hex_hash[2 * SHA_DIGEST_LENGTH + 2];
+ unsigned int i = 0;
+
+ for (int i = 0; i < SHA_DIGEST_LENGTH; i++) {
+ for (i = 0; i < SHA_DIGEST_LENGTH; i++) {
+ sprintf(hex_hash + 2 * i + 1, "%02x", hash2[i]);
+
+ hex_hash[2 * i + 1] = toupper(hex_hash[2 * i + 1]);
Expand Down Expand Up @@ -148,7 +149,9 @@
+ sqlite3_result_text(context, err_msg, -1, SQLITE_TRANSIENT);
+ return;
+ } else {
+ for (unsigned int i = 0; i < sizeof(salt_buf)/sizeof(unsigned char); i++) {
+ unsigned int i = 0;
+
+ for (i = 0; i < sizeof(salt_buf)/sizeof(unsigned char); i++) {
+ salt_buf[i] = salt_buf[i] & 0x7f;
+
+ if (salt_buf[i] == '\0' || salt_buf[i] == '$') {
Expand Down Expand Up @@ -181,7 +184,7 @@
/*
** current_time()
**
@@ -129263,6 +129437,9 @@
@@ -129263,6 +129440,9 @@
FUNCTION(substr, 3, 0, 0, substrFunc ),
FUNCTION(substring, 2, 0, 0, substrFunc ),
FUNCTION(substring, 3, 0, 0, substrFunc ),
Expand Down

0 comments on commit 04866fd

Please sign in to comment.