Includes to pres-checker a checksum of a image that makes Libreoffice crash

This commit is contained in:
Gustavo Trott 2021-09-30 14:09:48 -03:00
parent 77e072ed60
commit 382c43e0bc

View File

@ -99,9 +99,9 @@ public class Main {
private final class TinyTileBackgroundPredicate
implements Predicate<XSLFPictureData> {
public boolean evaluate(XSLFPictureData img) {
return img.getContentType() != null
&& img.getContentType().equals("image/jpeg")
&& LittleEndian.getLong(img.getChecksum()) == 4114937224L;
return img.getContentType() != null
&& ((img.getContentType().equals("image/jpeg") && LittleEndian.getLong(img.getChecksum()) == 4114937224L) ||
(img.getContentType().equals("image/png") && LittleEndian.getLong(img.getChecksum()) == 3207965638L));
}
}