diff options
author | Jay Berkenbilt <ejb@ql.org> | 2017-08-29 18:27:44 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2017-08-29 18:28:32 +0200 |
commit | 742190bd98c0981a07cb39a8eae1e99d909ad5ae (patch) | |
tree | 816d71a3f35e64c16c83dae4bc0c863e51723c70 /libqpdf | |
parent | 6d46346eb93d5032c08cf1e39023b5d57260a766 (diff) | |
download | qpdf-742190bd98c0981a07cb39a8eae1e99d909ad5ae.tar.zst |
Pl_PNGFilter: disallow columns = 0
Diffstat (limited to 'libqpdf')
-rw-r--r-- | libqpdf/Pl_PNGFilter.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libqpdf/Pl_PNGFilter.cc b/libqpdf/Pl_PNGFilter.cc index 4b79e6b1..1566c8a5 100644 --- a/libqpdf/Pl_PNGFilter.cc +++ b/libqpdf/Pl_PNGFilter.cc @@ -14,6 +14,10 @@ Pl_PNGFilter::Pl_PNGFilter(char const* identifier, Pipeline* next, buf2(0), pos(0) { + if (columns == 0) + { + throw std::runtime_error("PNGFilter created with columns = 0"); + } this->buf1 = new unsigned char[columns + 1]; this->buf2 = new unsigned char[columns + 1]; this->cur_row = buf1; |