summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2015-07-16 22:07:13 +0000
committerpfg <pfg@FreeBSD.org>2015-07-16 22:07:13 +0000
commit65f6bba7895b47474acce190fd23bbfdef8bb868 (patch)
treed90c3cbea384af8b0cabb3df811290835bdb9df6
parent67db66d5ea7551afec6c60cd04acfdfad7c6eae3 (diff)
downloadFreeBSD-src-65f6bba7895b47474acce190fd23bbfdef8bb868.zip
FreeBSD-src-65f6bba7895b47474acce190fd23bbfdef8bb868.tar.gz
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
-rw-r--r--contrib/sqlite3/sqlite3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/sqlite3/sqlite3.c b/contrib/sqlite3/sqlite3.c
index a8922e4..8a80dcd 100644
--- a/contrib/sqlite3/sqlite3.c
+++ b/contrib/sqlite3/sqlite3.c
@@ -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));
}
/*
OpenPOWER on IntegriCloud