Description
When trying to set a font using CSPageContentStream.setFont() a new key is required which is created in PDResources.createKey(), ca line 450.
If the dict keySet contains "F1", "F2", "F4", "F5" then just trying to use
(dict.keySet().size() + 1)
will not find a new key und the loop won't terminate.
This here terminates:
String key; int i = dict.keySet().size(); do { i++; key = prefix + i; } while (dict.containsKey(key));
Attachments
Issue Links
- duplicates
-
PDFBOX-2822 infinite loop of searching for a key in PDResources
- Closed