1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-18 10:21:03 +03:00

Add documentation to make it clear that short reads from xRead in the VFS

must be zero-filled. (CVS 5867)

FossilOrigin-Name: fb311d6f4098a08f05b3fac9a2a7e2a53c38bb5f
This commit is contained in:
drh
2008-11-07 00:06:18 +00:00
parent 1735fa8892
commit 4c17c3fb11
6 changed files with 23 additions and 14 deletions

View File

@@ -12,7 +12,7 @@
**
** This file contains code that is specific to OS/2.
**
** $Id: os_os2.c,v 1.57 2008/10/13 21:46:47 pweilbacher Exp $
** $Id: os_os2.c,v 1.58 2008/11/07 00:06:18 drh Exp $
*/
#include "sqliteInt.h"
@@ -124,6 +124,7 @@ static int os2Read(
if( got == (ULONG)amt )
return SQLITE_OK;
else {
/* Unread portions of the input buffer must be zero-filled */
memset(&((char*)pBuf)[got], 0, amt-got);
return SQLITE_IOERR_SHORT_READ;
}