mirror of
https://github.com/michaelrsweet/pdfio.git
synced 2025-05-15 11:31:50 +02:00
Add more range checking for streams.
This commit is contained in:
parent
d1bf9a92dc
commit
5b08046ece
@ -270,7 +270,7 @@ _pdfioStreamCreate(
|
|||||||
{
|
{
|
||||||
columns = 1;
|
columns = 1;
|
||||||
}
|
}
|
||||||
else if (columns < 0)
|
else if (columns < 0 || columns > 65536)
|
||||||
{
|
{
|
||||||
_pdfioFileError(st->pdf, "Unsupported Columns value %d.", columns);
|
_pdfioFileError(st->pdf, "Unsupported Columns value %d.", columns);
|
||||||
free(st);
|
free(st);
|
||||||
@ -542,7 +542,7 @@ _pdfioStreamOpen(pdfio_obj_t *obj, // I - Object
|
|||||||
{
|
{
|
||||||
columns = 1;
|
columns = 1;
|
||||||
}
|
}
|
||||||
else if (columns < 0)
|
else if (columns < 0 || columns > 65536)
|
||||||
{
|
{
|
||||||
_pdfioFileError(st->pdf, "Unsupported Columns value %d.", columns);
|
_pdfioFileError(st->pdf, "Unsupported Columns value %d.", columns);
|
||||||
goto error;
|
goto error;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user