Skip to content

Commit

Permalink
Merge pull request #533 from oraveczandrew/file-header-utils-fix
Browse files Browse the repository at this point in the history
fix ArrayIndexOutOfBoundsException in FileHeaderUtils
  • Loading branch information
Konloch authored Feb 28, 2025
2 parents 856f30b + 5abb8c9 commit 9c866ec
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public class FileHeaderUtils

public static boolean doesFileHeaderMatch(byte[] bytes, int fileHeader)
{
if (bytes.length < 4) return false;

int bytesHeader = ((bytes[0] & 0xFF) << 24)
| ((bytes[1] & 0xFF) << 16)
| ((bytes[2] & 0xFF) << 8)
Expand Down

0 comments on commit 9c866ec

Please sign in to comment.