]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
When a memory allocation fails on the %Q conversion in sqlite3_mprintf(),
authordrh <drh@noemail.net>
Thu, 20 Nov 2008 18:20:28 +0000 (18:20 +0000)
committerdrh <drh@noemail.net>
Thu, 20 Nov 2008 18:20:28 +0000 (18:20 +0000)
make sure the error is reported back up the call stack. (CVS 5933)

FossilOrigin-Name: eebacbc9d7d0625dfbe6367046fa4a0ca9c04e74

manifest
manifest.uuid
src/printf.c

index 9c0d7c6955eefa1d1f3b64224ef20153e6f5fa08..2dce09267f9eff6baa4c4db79ec59211d625b5a9 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C In\sos_win.c,\sif\sSQLITE_TEST\sdefined,\swinRandomness()\sshould\sreturn\sall\szeroes\slike\sos_unix.c.\s(CVS\s5932)
-D 2008-11-19T21:35:47
+C When\sa\smemory\sallocation\sfails\son\sthe\s%Q\sconversion\sin\ssqlite3_mprintf(),\nmake\ssure\sthe\serror\sis\sreported\sback\sup\sthe\scall\sstack.\s(CVS\s5933)
+D 2008-11-20T18:20:28
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in 0aa7bbe3be6acc4045706e3bb3fd0b8f38f4a3b5
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -147,7 +147,7 @@ F src/pcache.h f20c3e82dd6da622c3fe296170cb1801f9a2d75a
 F src/pcache1.c 2453a3e925841fdb610f39bba24def8b2ad4a908
 F src/pragma.c 0a5051029c5b687e2f2669d91aa3281ebcbe4fdb
 F src/prepare.c fcadb25d2ad722d87103517333c825b56b79a770
-F src/printf.c 5fe6ba48f897caacc8125e3d16c6bbae6b282214
+F src/printf.c ce86aed93a704938ca4d0344aaa763271842a4b0
 F src/random.c a87afbd598aa877e23ac676ee92fd8ee5c786a51
 F src/resolve.c 4af5391d2b4c1d6c583a6805ac6660181de4545b
 F src/select.c e01537d4d8b8b81a6507e07ebb17fc232dacdda7
@@ -659,7 +659,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P 01a6e2820af0729f01ce90664ce9a6aa63e5b09a
-R 76c151a976f8d3a735617b3c9cd38e30
-U shane
-Z dc6f492a5f846806441eff5aaa950b52
+P 00b68a1e3164fbf04dabb480c2037be45612b4e4
+R 38e4d91990d6f71d4806b7fd8231a0a6
+U drh
+Z c8c595ff0394bbf0b4f1b46a403a8fd7
index 5d472e37141be275b027a7109edab09eee487cff..cb60f91a955a2f8ffe86ae411a9985872ee5458a 100644 (file)
@@ -1 +1 @@
-00b68a1e3164fbf04dabb480c2037be45612b4e4
\ No newline at end of file
+eebacbc9d7d0625dfbe6367046fa4a0ca9c04e74
\ No newline at end of file
index 59d09801d8b8adac4e2d7110b8e238c9a9a4bb79..8729f39d81efa61b93d9fbd0cec373b62c49de96 100644 (file)
@@ -5,7 +5,7 @@
 ** an historical reference.  Most of the "enhancements" have been backed
 ** out so that the functionality is now the same as standard printf().
 **
-** $Id: printf.c,v 1.95 2008/11/17 19:18:55 danielk1977 Exp $
+** $Id: printf.c,v 1.96 2008/11/20 18:20:28 drh Exp $
 **
 **************************************************************************
 **
@@ -645,7 +645,10 @@ void sqlite3VXPrintf(
         n += i + 1 + needQuote*2;
         if( n>etBUFSIZE ){
           bufpt = zExtra = sqlite3Malloc( n );
-          if( bufpt==0 ) return;
+          if( bufpt==0 ){
+            pAccum->mallocFailed = 1;
+            return;
+          }
         }else{
           bufpt = buf;
         }