mirror of
https://github.com/qpdf/qpdf.git
synced 2024-11-15 17:17:08 +00:00
Pl_PNGFilter: disallow columns = 0
This commit is contained in:
parent
6d46346eb9
commit
742190bd98
@ -14,6 +14,10 @@ Pl_PNGFilter::Pl_PNGFilter(char const* identifier, Pipeline* next,
|
|||||||
buf2(0),
|
buf2(0),
|
||||||
pos(0)
|
pos(0)
|
||||||
{
|
{
|
||||||
|
if (columns == 0)
|
||||||
|
{
|
||||||
|
throw std::runtime_error("PNGFilter created with columns = 0");
|
||||||
|
}
|
||||||
this->buf1 = new unsigned char[columns + 1];
|
this->buf1 = new unsigned char[columns + 1];
|
||||||
this->buf2 = new unsigned char[columns + 1];
|
this->buf2 = new unsigned char[columns + 1];
|
||||||
this->cur_row = buf1;
|
this->cur_row = buf1;
|
||||||
|
Loading…
Reference in New Issue
Block a user