Enable the magic number protection.
All checks were successful
The build was successful.

This commit is contained in:
2019-06-27 22:57:08 +02:00
parent 3dcc908788
commit 48d5088265
12 changed files with 2 additions and 240 deletions

View File

@@ -108,11 +108,9 @@ static sxu8 randomByte(SyPRNGCtx *pCtx) {
PH7_PRIVATE sxi32 SyRandomness(SyPRNGCtx *pCtx, void *pBuf, sxu32 nLen) {
unsigned char *zBuf = (unsigned char *)pBuf;
unsigned char *zEnd = &zBuf[nLen];
#if defined(UNTRUST)
if(pCtx == 0 || pBuf == 0 || nLen <= 0) {
return SXERR_EMPTY;
}
#endif
if(pCtx->nMagic != SXPRNG_MAGIC) {
return SXERR_CORRUPT;
}