Skip to content

Commit

Permalink
'sepinf-inc#1898: avoid possible AIOOBE in commit 902326d
Browse files Browse the repository at this point in the history
  • Loading branch information
lfcnassif committed Oct 31, 2023
1 parent b1beb1c commit 4bb58db
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ public void parse(InputStream indexFile, ContentHandler handler, Metadata metada

// Checking attachments image
for (DiscordAttachment att : dr.getAttachments()) {
if (ce2.getRequestURL().contains(att.getUrl().split("https://cdn.discordapp.com/attachments/")[1])) {
String[] parts = att.getUrl().split("https://cdn.discordapp.com/attachments/");
if (parts.length > 1 && ce2.getRequestURL().contains(parts[1])) {
for (IItemReader ib : externalFiles) {
if (ib.getName() != null && ib.getName().equals(ce2.getName())) {
att.setMediaHash(ib.getHash());
Expand Down

0 comments on commit 4bb58db

Please sign in to comment.