From: drh <> Date: Thu, 22 Apr 2021 13:59:54 +0000 (+0000) Subject: Ensure that the typedefs for specific-length integers in zipfile.c are X-Git-Tag: version-3.36.0~167 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1da9c97bc0f80f9e05348b36f6cdfb61aee3010f;p=thirdparty%2Fsqlite.git Ensure that the typedefs for specific-length integers in zipfile.c are correct. FossilOrigin-Name: f1f2a49007e938ea7a00dda6f8898b1cd38525c0de1e1cac00a7aebcd7b625f5 --- diff --git a/ext/misc/zipfile.c b/ext/misc/zipfile.c index f9fbcfc0bd..4aefc61dcc 100644 --- a/ext/misc/zipfile.c +++ b/ext/misc/zipfile.c @@ -36,10 +36,24 @@ SQLITE_EXTENSION_INIT1 #ifndef SQLITE_AMALGAMATION +#ifndef UINT32_TYPE +# ifdef HAVE_UINT32_T +# define UINT32_TYPE uint32_t +# else +# define UINT32_TYPE unsigned int +# endif +#endif +#ifndef UINT16_TYPE +# ifdef HAVE_UINT16_T +# define UINT16_TYPE uint16_t +# else +# define UINT16_TYPE unsigned short int +# endif +#endif typedef sqlite3_int64 i64; typedef unsigned char u8; -typedef unsigned short u16; -typedef unsigned long u32; +typedef UINT32_TYPE u32; /* 4-byte unsigned integer */ +typedef UINT16_TYPE u16; /* 2-byte unsigned integer */ #define MIN(a,b) ((a)<(b) ? (a) : (b)) #if defined(SQLITE_COVERAGE_TEST) || defined(SQLITE_MUTATION_TEST) @@ -2170,6 +2184,10 @@ static int zipfileRegister(sqlite3 *db){ zipfileStep, zipfileFinal ); } + assert( sizeof(i64)==8 ); + assert( sizeof(u32)==4 ); + assert( sizeof(u16)==2 ); + assert( sizeof(u8)==1 ); return rc; } #else /* SQLITE_OMIT_VIRTUALTABLE */ diff --git a/manifest b/manifest index 9c363fb2b9..56bf854028 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C In\sthe\swhereLoopXfer()\sroutine,\sensure\sthat\sthe\sdestination\sis\sfully\ninitialized\seven\sif\san\sOOM\serror\soccurs. -D 2021-04-22T12:38:30.898 +C Ensure\sthat\sthe\stypedefs\sfor\sspecific-length\sintegers\sin\szipfile.c\sare\ncorrect. +D 2021-04-22T13:59:54.423 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -337,7 +337,7 @@ F ext/misc/vfsstat.c 389ea13983d3af926504c314f06a83cc858d5adc24b40af74aaed1fece0 F ext/misc/vtablog.c 5538acd0c8ddaae372331bee11608d76973436b77d6a91e8635cfc9432fba5ae F ext/misc/vtshim.c 1976e6dd68dd0d64508c91a6dfab8e75f8aaf6cd F ext/misc/wholenumber.c a838d1bea913c514ff316c69695efbb49ea3b8cb37d22afc57f73b6b010b4546 -F ext/misc/zipfile.c e35e035bc2765b1ccdcb15f9815c2112843fcbc8f36aa071f0e5935df7072228 +F ext/misc/zipfile.c 5fe27e5dd6527bfce5d734b5a039a8a65b4893fe86b225f89bcac9f062f9c8ac F ext/misc/zorder.c b0ff58fa643afa1d846786d51ea8d5c4b6b35aa0254ab5a82617db92f3adda64 F ext/rbu/rbu.c b880ca5cb857d6d6f52e72eb7397813058ef48c78c5402cd04ff2b6b5437f622 F ext/rbu/rbu1.test 221d9c18a5e600ac9ac6b1810d99d9f99163a7909ba61597876ab6e4d4beb3d6 @@ -1913,7 +1913,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 02af30aab24878c4382a8863512b816889400104549b51df6a632767fee48d04 -R 3d8464626ec4ed7160b5e3f3b7bf199b +P c4258708c08c5b1956052f9febbf22c1e94c8352a25059063746921d2cc373b7 +R 68effacd960bb41901ef2b804dd3c9b2 U drh -Z 9339130783244dccd8482f7c789d5fd4 +Z c5ba6536955e62a1fdaffb0e62c18960 diff --git a/manifest.uuid b/manifest.uuid index 8ee3ab80b8..5201e43b18 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -c4258708c08c5b1956052f9febbf22c1e94c8352a25059063746921d2cc373b7 \ No newline at end of file +f1f2a49007e938ea7a00dda6f8898b1cd38525c0de1e1cac00a7aebcd7b625f5 \ No newline at end of file