mirror of
https://github.com/sqlite/sqlite.git
synced 2025-10-27 08:52:26 +03:00
Make sure the rc variable in OsWrite of os_win.c is always initialized.
Also assert that the amt parameter is always greater than zero. Ticket #1094. (CVS 2309) FossilOrigin-Name: 4b399ae7791288e5d44f90da530908d9ca77ff4b
This commit is contained in:
20
manifest
20
manifest
@@ -1,5 +1,5 @@
|
||||
C Fix\sa\scomment\sin\ssqlite3.h.\sNo\scode\schanges.\sTicket\s#1093.\s(CVS\s2308)
|
||||
D 2005-02-02T01:13:38
|
||||
C Make\ssure\sthe\src\svariable\sin\sOsWrite\sof\sos_win.c\sis\salways\sinitialized.\nAlso\sassert\sthat\sthe\samt\sparameter\sis\salways\sgreater\sthan\szero.\nTicket\s#1094.\s(CVS\s2309)
|
||||
D 2005-02-03T00:29:47
|
||||
F Makefile.in ffd81f5e926d40b457071b4de8d7c1fa18f39b5a
|
||||
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
|
||||
F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1
|
||||
@@ -48,9 +48,9 @@ F src/os.h ae44064dc118b20d39450cb331409a775e8bb1c6
|
||||
F src/os_common.h 0e7f428ba0a6c40a61bc56c4e96f493231301b73
|
||||
F src/os_test.c 91e5f22dd89491e5e1554820e715805f43fa4ece
|
||||
F src/os_test.h 6a26a4978492e4bbdbf385554958418ff02db162
|
||||
F src/os_unix.c 1f17ceff056c64939e5f2e98bf909fc64d0929ca
|
||||
F src/os_unix.c 68d3d32937eee90fe1f50d500d1a4ee826cbe790
|
||||
F src/os_unix.h f3097815e041e82e24d92505e1ff61ba24172d13
|
||||
F src/os_win.c 3c0b0a3bc33318cf555a1cd130232ad1b9a5a711
|
||||
F src/os_win.c bddeae1c3299be0fbe47077dd4e98b786a067f71
|
||||
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
|
||||
F src/pager.c d21565d0e844712809140632062a7b72b768fdff
|
||||
F src/pager.h 9eba8c53dd91eae7f3f90743b2ee242da02a9862
|
||||
@@ -254,12 +254,12 @@ F www/dynload.tcl 02eb8273aa78cfa9070dd4501dca937fb22b466c
|
||||
F www/faq.tcl 1e348dec52dc0f21f4216fd6918c69c56daa4cfd
|
||||
F www/fileformat.tcl 900c95b9633abc3dcfc384d9ddd8eb4876793059
|
||||
F www/formatchng.tcl bfbf14dbf5181e771d06da7797767b0200b36d8a
|
||||
F www/index.tcl 2ac775d5247922fd0f5d62178b28d41ccaed7d01
|
||||
F www/index.tcl 8cd6d913cccfbd8d46e9b1310fb329fdfbf6053a
|
||||
F www/lang.tcl aeb76706558763b3847390a646b3a0ab649c468c
|
||||
F www/lockingv3.tcl f59b19d6c8920a931f096699d6faaf61c05db55f
|
||||
F www/mingw.tcl d96b451568c5d28545fefe0c80bee3431c73f69c
|
||||
F www/nulls.tcl ec35193f92485b87b90a994a01d0171b58823fcf
|
||||
F www/oldnews.tcl e8851b24fe424364cd0f3f36b1b4036effea60ef
|
||||
F www/oldnews.tcl 5cd036f0c76e4ba3111f153a4ff4c9e5e34b6038
|
||||
F www/omitted.tcl 9f332aea97b47ec53234f4cd9aa4b4a6da8641ec
|
||||
F www/opcode.tcl dafa030a5a3cc24a2f9fd4cfbfb7d7323d2151b0
|
||||
F www/optimizing.tcl f0b2538988d1bbad16cbfe63ec6e8f48c9eb04e5
|
||||
@@ -272,7 +272,7 @@ F www/tclsqlite.tcl e73f8f8e5f20e8277619433f7970060ab01088fc
|
||||
F www/vdbe.tcl 095f106d93875c94b47367384ebc870517431618
|
||||
F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
|
||||
F www/whentouse.tcl 3e522a06ad41992023c80ca29a048ae2331ca5bd
|
||||
P 506088796c846243e24c4cba6be4ce6511fdb345
|
||||
R 0ba2e9f3b7d1ba33d703d526a858f307
|
||||
U danielk1977
|
||||
Z a1ecd87fa80c4e91a7bb3da07993c58a
|
||||
P d1ea2fb70be905947c8ff74da8e1f719a8fb85f5
|
||||
R c85ccce2907809e515bc05d150167893
|
||||
U drh
|
||||
Z 76aa18a2185ff42425ab752d44606f71
|
||||
|
||||
@@ -1 +1 @@
|
||||
d1ea2fb70be905947c8ff74da8e1f719a8fb85f5
|
||||
4b399ae7791288e5d44f90da530908d9ca77ff4b
|
||||
@@ -661,6 +661,7 @@ int sqlite3OsRead(OsFile *id, void *pBuf, int amt){
|
||||
int sqlite3OsWrite(OsFile *id, const void *pBuf, int amt){
|
||||
int wrote = 0;
|
||||
assert( id->isOpen );
|
||||
assert( amt>0 );
|
||||
SimulateIOError(SQLITE_IOERR);
|
||||
SimulateDiskfullError;
|
||||
TIMER_START;
|
||||
|
||||
@@ -275,12 +275,13 @@ int sqlite3OsRead(OsFile *id, void *pBuf, int amt){
|
||||
** or some other error code on failure.
|
||||
*/
|
||||
int sqlite3OsWrite(OsFile *id, const void *pBuf, int amt){
|
||||
int rc;
|
||||
int rc = 0;
|
||||
DWORD wrote;
|
||||
assert( id->isOpen );
|
||||
SimulateIOError(SQLITE_IOERR);
|
||||
SimulateDiskfullError;
|
||||
TRACE3("WRITE %d lock=%d\n", id->h, id->locktype);
|
||||
assert( amt>0 );
|
||||
while( amt>0 && (rc = WriteFile(id->h, pBuf, amt, &wrote, 0))!=0 && wrote>0 ){
|
||||
amt -= wrote;
|
||||
pBuf = &((char*)pBuf)[wrote];
|
||||
|
||||
@@ -61,16 +61,14 @@ proc newsitem {date title text} {
|
||||
puts "<hr width=\"50%\">"
|
||||
}
|
||||
|
||||
newsitem {2005-Jan-21} {Version 3.1.0 (alpha) Released} {
|
||||
Version 3.1.0 (alpha) is now available on the
|
||||
website. Verison 3.1.0 is fully backwards compatible with the 3.0 series
|
||||
newsitem {2005-Feb-01} {Version 3.1.1 (beta) Released} {
|
||||
Version 3.1.1 (beta) is now available on the
|
||||
website. Verison 3.1.1 is fully backwards compatible with the 3.0 series
|
||||
and features many new features including Autovacuum and correlated
|
||||
subqueries. See the
|
||||
subqueries. The
|
||||
<a href="http://www.sqlite.org/releasenotes310.html">release notes</a>
|
||||
for details.
|
||||
|
||||
This is an alpha release. A beta release is expected in about a week
|
||||
with the first stable release to follow after two more weeks.
|
||||
From version 3.1.0 apply equally to this release beta. A stable release
|
||||
is expected within a couple of weeks.
|
||||
}
|
||||
|
||||
newsitem {2004-Nov-09} {SQLite at the 2004 International PHP Conference} {
|
||||
@@ -105,4 +103,4 @@ puts {
|
||||
<p align="right"><a href="oldnews.html">Old news...</a></p>
|
||||
</td></tr></table>
|
||||
}
|
||||
footer {$Id: index.tcl,v 1.104 2005/01/21 18:19:28 drh Exp $}
|
||||
footer {$Id: index.tcl,v 1.105 2005/02/03 00:29:47 drh Exp $}
|
||||
|
||||
@@ -9,6 +9,18 @@ proc newsitem {date title text} {
|
||||
puts "<hr width=\"50%\">"
|
||||
}
|
||||
|
||||
newsitem {2005-Jan-21} {Version 3.1.0 (alpha) Released} {
|
||||
Version 3.1.0 (alpha) is now available on the
|
||||
website. Verison 3.1.0 is fully backwards compatible with the 3.0 series
|
||||
and features many new features including Autovacuum and correlated
|
||||
subqueries. See the
|
||||
<a href="http://www.sqlite.org/releasenotes310.html">release notes</a>
|
||||
for details.
|
||||
|
||||
This is an alpha release. A beta release is expected in about a week
|
||||
with the first stable release to follow after two more weeks.
|
||||
}
|
||||
|
||||
newsitem {2004-Oct-11} {Version 3.0.8} {
|
||||
Version 3.0.8 of SQLite contains several code optimizations and minor
|
||||
bug fixes and adds support for DEFERRED, IMMEDIATE, and EXCLUSIVE
|
||||
@@ -129,4 +141,4 @@ newsitem {2004-Apr-23} {Work Begins On SQLite Version 3} {
|
||||
Plans are to continue to support SQLite version 2.8 with
|
||||
bug fixes. But all new development will occur in version 3.0.
|
||||
}
|
||||
footer {$Id: oldnews.tcl,v 1.8 2005/01/21 18:19:29 drh Exp $}
|
||||
footer {$Id: oldnews.tcl,v 1.9 2005/02/03 00:29:48 drh Exp $}
|
||||
|
||||
Reference in New Issue
Block a user