itext
5091
Anomaly identified by the detector. Please review whether this anomaly corresponds to a misuse.
finding-11
com/itextpdf/text/pdf/PageResources.java
setOriginalResources(PdfDictionary, int[])
class PageResources { void setOriginalResources(PdfDictionary resources, int newNamePtr[]) { if (newNamePtr != null) namePtr = newNamePtr; forbiddenNames = new HashSet<PdfName>(); usedNames = new HashMap<PdfName, PdfName>(); if (resources == null) return; originalResources = new PdfDictionary(); originalResources.merge(resources); for (Object element : resources.getKeys()) { PdfName key = (PdfName)element; PdfObject sub = PdfReader.getPdfObject(resources.get(key)); if (sub != null && sub.isDictionary()) { PdfDictionary dic = (PdfDictionary)sub; for (PdfName element2 : dic.getKeys()) { forbiddenNames.add(element2); } PdfDictionary dic2 = new PdfDictionary(); dic2.merge(dic); originalResources.put(key, dic2); } } } }
11
0.94
16.3
31