Commit 5c253d1c13d9d3d4123554d6775090a100f798fa

Authored by Jay Berkenbilt
1 parent 62c5fa6b

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
Showing 1 changed file with 1 additions and 1 deletions
libqpdf/Pl_AES_PDF.cc
... ... @@ -121,7 +121,7 @@ Pl_AES_PDF::initializeVector()
121 121 srandom(seed);
122 122 for (unsigned int i = 0; i < this->buf_size; ++i)
123 123 {
124   - this->cbc_block[i] = (unsigned char)(random() & 0xff);
  124 + this->cbc_block[i] = (unsigned char)((random() & 0xff0) >> 4);
125 125 }
126 126 }
127 127  
... ...