diff options
author | Jay Berkenbilt <ejb@ql.org> | 2009-10-18 02:13:45 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2009-10-18 02:13:45 +0200 |
commit | 5c253d1c13d9d3d4123554d6775090a100f798fa (patch) | |
tree | 0420229d2ed6ea582e38943e0988225808ab6830 | |
parent | 62c5fa6b48bb08018f023fe4a08e3139ca771691 (diff) | |
download | qpdf-5c253d1c13d9d3d4123554d6775090a100f798fa.tar.zst |
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
-rw-r--r-- | libqpdf/Pl_AES_PDF.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libqpdf/Pl_AES_PDF.cc b/libqpdf/Pl_AES_PDF.cc index 4b715012..c3fd03a9 100644 --- a/libqpdf/Pl_AES_PDF.cc +++ b/libqpdf/Pl_AES_PDF.cc @@ -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); } } |