sqlite: clean a couple of invocations of memcpy(3)

Found almost accidentally by our native gcc when enhanced with
FORTIFY_SOURCE.

Submitted by:	Oliver Pinter
Sponosored by:	Google Inc. GSoC 2015
This commit is contained in:
pfg 2015-07-16 22:07:13 +00:00
parent 67db66d5ea
commit 65f6bba789

View File

@ -49487,9 +49487,9 @@ static void walIndexWriteHdr(Wal *pWal){
pWal->hdr.isInit = 1;
pWal->hdr.iVersion = WALINDEX_MAX_VERSION;
walChecksumBytes(1, (u8*)&pWal->hdr, nCksum, 0, pWal->hdr.aCksum);
memcpy((void *)&aHdr[1], (void *)&pWal->hdr, sizeof(WalIndexHdr));
memcpy((void *)&aHdr[1], (const void *)&pWal->hdr, sizeof(WalIndexHdr));
walShmBarrier(pWal);
memcpy((void *)&aHdr[0], (void *)&pWal->hdr, sizeof(WalIndexHdr));
memcpy((void *)&aHdr[0], (const void *)&pWal->hdr, sizeof(WalIndexHdr));
}
/*