diff options
author | drh <drh@noemail.net> | 2008-11-07 00:06:18 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2008-11-07 00:06:18 +0000 |
commit | 4c17c3fb115c10c744b710c91177f7090ae2ecb9 (patch) | |
tree | 949f60865c5c609c7944703663fb628bb93605f5 /src/os_unix.c | |
parent | 1735fa8892b658988b1e92a4bc96627ca53510c5 (diff) | |
download | sqlite-4c17c3fb115c10c744b710c91177f7090ae2ecb9.tar.gz sqlite-4c17c3fb115c10c744b710c91177f7090ae2ecb9.zip |
Add documentation to make it clear that short reads from xRead in the VFS
must be zero-filled. (CVS 5867)
FossilOrigin-Name: fb311d6f4098a08f05b3fac9a2a7e2a53c38bb5f
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 12509d1f6..503915c6b 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -12,7 +12,7 @@ ** ** This file contains code that is specific to Unix systems. ** -** $Id: os_unix.c,v 1.207 2008/10/16 13:27:41 danielk1977 Exp $ +** $Id: os_unix.c,v 1.208 2008/11/07 00:06:18 drh Exp $ */ #include "sqliteInt.h" #if SQLITE_OS_UNIX /* This file is used on unix only */ @@ -897,6 +897,7 @@ static int unixRead( }else if( got<0 ){ return SQLITE_IOERR_READ; }else{ + /* Unread parts of the buffer must be zero-filled */ memset(&((char*)pBuf)[got], 0, amt-got); return SQLITE_IOERR_SHORT_READ; } |