Allow parsing of SVG attribute values >10MB #2195

This commit is contained in:
Lovell Fuller
2020-05-06 20:56:08 +01:00
parent 40c00035ee
commit 86acf2460e
2 changed files with 9 additions and 0 deletions

View File

@@ -279,6 +279,9 @@ namespace sharp {
vips::VOption *option = VImage::option()
->set("access", descriptor->access)
->set("fail", descriptor->failOnError);
if (imageType == ImageType::SVG) {
option->set("unlimited", TRUE);
}
if (imageType == ImageType::SVG || imageType == ImageType::PDF) {
option->set("dpi", descriptor->density);
}
@@ -325,6 +328,9 @@ namespace sharp {
vips::VOption *option = VImage::option()
->set("access", descriptor->access)
->set("fail", descriptor->failOnError);
if (imageType == ImageType::SVG) {
option->set("unlimited", TRUE);
}
if (imageType == ImageType::SVG || imageType == ImageType::PDF) {
option->set("dpi", descriptor->density);
}