2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-06-06 12:20:56 +00:00

avoid low order bits of random just in case it's rand

git-svn-id: svn+q:///qpdf/trunk@815 71b93d88-0707-0410-a8cf-f5a4172ac649
This commit is contained in:
Jay Berkenbilt 2009-10-18 00:13:45 +00:00
parent 62c5fa6b48
commit 5c253d1c13

View File

@ -121,7 +121,7 @@ Pl_AES_PDF::initializeVector()
srandom(seed);
for (unsigned int i = 0; i < this->buf_size; ++i)
{
this->cbc_block[i] = (unsigned char)(random() & 0xff);
this->cbc_block[i] = (unsigned char)((random() & 0xff0) >> 4);
}
}