1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Fix an off-by-one error in the ChaCha20 initialization code.

FossilOrigin-Name: 72e220eed446ea9a02a6ef03e09a01bcb8bbca1f3b32d2e0bf52a17d9722e2f0
This commit is contained in:
drh
2022-08-16 16:40:54 +00:00
parent 0f201fccc0
commit 534945ad07
3 changed files with 8 additions and 8 deletions

View File

@@ -108,7 +108,7 @@ void sqlite3_randomness(int N, void *pBuf){
}else{
sqlite3OsRandomness(pVfs, 44, (char*)&wsdPrng.s[4]);
}
wsdPrng.s[16] = wsdPrng.s[12];
wsdPrng.s[15] = wsdPrng.s[12];
wsdPrng.s[12] = 0;
wsdPrng.n = 0;
}