From: stephan Date: Tue, 21 Oct 2025 16:10:09 +0000 (+0000) Subject: Back out [b144f875d6bddce6] and remove strchrnul() from printf.c because it's not... X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f4720e195eba980837574c2537ed8c8169d8d7e3;p=thirdparty%2Fsqlite.git Back out [b144f875d6bddce6] and remove strchrnul() from printf.c because it's not as portable as we'd hoped. FossilOrigin-Name: fdb0d581134895af7676e8eb1a1c12353fafa0c67732e84214f10d5de89b1456 --- diff --git a/autosetup/sqlite-config.tcl b/autosetup/sqlite-config.tcl index 5855366c03..7c798b31a2 100644 --- a/autosetup/sqlite-config.tcl +++ b/autosetup/sqlite-config.tcl @@ -616,21 +616,6 @@ proc sqlite-check-common-bins {} { } } -# A workaround for the strchrnul() check on some Mac platforms: -# https://sqlite.org/forum/forumpost/95edc7a8d7d1de59 -proc sqlite-check-strchrnul {} { - msg-checking "Checking for strchrnul()... " - if {[cctest -link 1 \ - -includes {string.h} \ - -code {(void)strchrnul("foo",'f');}]} { - define HAVE_STRCHRNUL 1 - msg-result yes - } else { - define HAVE_STRCHRNUL 0 - msg-result no - } -} - ######################################################################## # Run checks for system-level includes and libs which are common to # both the canonical build and the "autoconf" bundle. @@ -647,7 +632,6 @@ proc sqlite-check-common-system-deps {} { # Check for needed/wanted functions cc-check-functions gmtime_r isnan localtime_r localtime_s \ usleep utime pread pread64 pwrite pwrite64 - sqlite-check-strchrnul apply {{} { set ldrt "" diff --git a/manifest b/manifest index f707e19330..cb967abc95 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Reduce\sthe\smaximum\ssize\sof\sLIKE\sand\sGLOB\spatterns\sin\sthe\sossfuzz.c\stest\nmodule\sto\savoid\sfalse-positive\sinfinite\sloop\sreports\sfrom\sOSS-Fuzz\sbased\non\slong\sand\scomplex\sfuzzer-generated\sLIKE/GLOB\spatterns\sthat\sare\snot\sactually\ninfinite\sloops,\sbut\swhich\sdo\stake\sa\slong\stime\sto\sresolve. -D 2025-10-19T17:30:07.855 +C Back\sout\s[b144f875d6bddce6]\sand\sremove\sstrchrnul()\sfrom\sprintf.c\sbecause\sit's\snot\sas\sportable\sas\swe'd\shoped. +D 2025-10-21T16:10:09.114 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea @@ -47,7 +47,7 @@ F autosetup/find_tclconfig.tcl e64886ffe3b982d4df42cd28ed91fe0b5940c2c5785e126c1 F autosetup/jimsh0.c a57c16e65dcffc9c76e496757cb3f7fb47e01ecbd1631a0a5e01751fc856f049 F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba F autosetup/proj.tcl ec30c4bc301b6e9eb937655744a7315f863f804fc66400d975bcf9352ac96a1d -F autosetup/sqlite-config.tcl b530d62d05972c61933b6fc02658be0612ca667048bf64929f7a91ca8ecad2a5 +F autosetup/sqlite-config.tcl 5d779fce20c11fde3fe99d157dcd5b5569d729b301141b8dfb8d5aacf9d48cba F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7ab1dba9 F autosetup/teaish/README.txt b40071e6f8506500a2f7f71d5fc69e0bf87b9d7678dd9da1e5b4d0acbf40b1ca F autosetup/teaish/core.tcl aee092fc71986d1272b835ea7492bb55ffc213a289502e4f14da80cf67b7e3c3 @@ -731,7 +731,7 @@ F src/pcache.h 1497ce1b823cf00094bb0cf3bac37b345937e6f910890c626b16512316d3abf5 F src/pcache1.c 131ca0daf4e66b4608d2945ae76d6ed90de3f60539afbd5ef9ec65667a5f2fcd F src/pragma.c ecec75795c1821520266e4f93fa8840cce48979af532db06f085e36a7813860f F src/prepare.c 2af0b5c1ec787c8eebd21baa9d79caf4a4dc3a18e76ce2edbf2027d706bca37a -F src/printf.c 7297c2aeed4d90d80c5ba82920d9e57b7bfad04b3466be1d7e042db382fe296e +F src/printf.c 2f712eefd481fe7818e2741d1bd7e946558365e25b652fcb039b2e70e6ac04a2 F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c F src/resolve.c f8d1d011aba0964ff1bdccd049d4d2c2fec217efd90d202a4bb775e926b2c25d F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97 @@ -2171,8 +2171,8 @@ F tool/version-info.c 33d0390ef484b3b1cb685d59362be891ea162123cea181cb8e6d2cf6dd F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7 F tool/warnings.sh 1ad0169b022b280bcaaf94a7fa231591be96b514230ab5c98fbf15cd7df842dd F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 6caf793b8f406f5089e3811591bc69384646df16ee18d63bd63760eaaa95d122 -R 69fa379b6b2c39c2868c3ce3729f3859 -U drh -Z 34daa97b3470f94f840fcd2ff082eed1 +P 53edea286b0a38f4f9c7017276f3a826037919144d517f8c89ef0f35b65af5f1 +R e8474a630273a0b7510c0e8b8d536d5a +U stephan +Z 2265f8ff22c59fd431deb94ae90d691d # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.tags b/manifest.tags index bec971799f..97a5934044 100644 --- a/manifest.tags +++ b/manifest.tags @@ -1,2 +1,2 @@ -branch trunk -tag trunk +branch mistake +tag mistake diff --git a/manifest.uuid b/manifest.uuid index b0cfcb72bb..6a38a3c712 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -53edea286b0a38f4f9c7017276f3a826037919144d517f8c89ef0f35b65af5f1 +fdb0d581134895af7676e8eb1a1c12353fafa0c67732e84214f10d5de89b1456 diff --git a/src/printf.c b/src/printf.c index f75ed3b8a2..9426dece11 100644 --- a/src/printf.c +++ b/src/printf.c @@ -241,14 +241,10 @@ void sqlite3_str_vappendf( for(; (c=(*fmt))!=0; ++fmt){ if( c!='%' ){ bufpt = (char *)fmt; -#if HAVE_STRCHRNUL - fmt = strchrnul(fmt, '%'); -#else fmt = strchr(fmt, '%'); if( fmt==0 ){ fmt = bufpt + strlen(bufpt); } -#endif sqlite3_str_append(pAccum, bufpt, (int)(fmt - bufpt)); if( *fmt==0 ) break; }