summaryrefslogtreecommitdiffstats
path: root/ext/misc/sqlar.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 05:16:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 05:16:44 +0000
commit62a67b10ff9f9eea6a4695649fb8252d2a4bc74d (patch)
tree7b54cadc082d323cda5fd24248e85b7d2ea664a3 /ext/misc/sqlar.c
parentAdding debian version 3.45.3-1. (diff)
downloadsqlite3-62a67b10ff9f9eea6a4695649fb8252d2a4bc74d.tar.xz
sqlite3-62a67b10ff9f9eea6a4695649fb8252d2a4bc74d.zip
Merging upstream version 3.46.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ext/misc/sqlar.c')
-rw-r--r--ext/misc/sqlar.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/misc/sqlar.c b/ext/misc/sqlar.c
index be079a5..9f726f0 100644
--- a/ext/misc/sqlar.c
+++ b/ext/misc/sqlar.c
@@ -81,7 +81,7 @@ static void sqlarUncompressFunc(
sqlite3_value **argv
){
uLong nData;
- uLongf sz;
+ sqlite3_int64 sz;
assert( argc==2 );
sz = sqlite3_value_int(argv[1]);
@@ -89,14 +89,15 @@ static void sqlarUncompressFunc(
if( sz<=0 || sz==(nData = sqlite3_value_bytes(argv[0])) ){
sqlite3_result_value(context, argv[0]);
}else{
+ uLongf szf = sz;
const Bytef *pData= sqlite3_value_blob(argv[0]);
Bytef *pOut = sqlite3_malloc(sz);
if( pOut==0 ){
sqlite3_result_error_nomem(context);
- }else if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){
+ }else if( Z_OK!=uncompress(pOut, &szf, pData, nData) ){
sqlite3_result_error(context, "error in uncompress()", -1);
}else{
- sqlite3_result_blob(context, pOut, sz, SQLITE_TRANSIENT);
+ sqlite3_result_blob(context, pOut, szf, SQLITE_TRANSIENT);
}
sqlite3_free(pOut);
}