Skip to content

Commit

Permalink
Fix 2db8d48: limit the profile-obtained name to 79 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosame committed Jul 23, 2024
1 parent 8994189 commit 8991aa7
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,9 @@ private String profileName(ICC_Profile profile) {
int offset = uInt32Number(bdesc, 24);
int maxlen = bdesc.length - offset;
if (maxlen > 0) {
if (maxlen > 79) {
maxlen = 79;
}
len = Math.min(len, maxlen);
return new String(bdesc, offset, len, StandardCharsets.UTF_16BE).trim();
}
Expand Down

0 comments on commit 8991aa7

Please sign in to comment.