Skip to content

Commit

Permalink
cbfs: Replace ArrayUtilities.arrayRangesEquals with Arrays.equals
Browse files Browse the repository at this point in the history
Partially addresses #20.
  • Loading branch information
al3xtjames committed Apr 26, 2022
1 parent 43f49a0 commit 3ca3f5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/firmware/cbfs/CBFSFileSystemFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package firmware.cbfs;

import java.io.IOException;
import java.util.Arrays;

import ghidra.app.util.bin.ByteProvider;
import ghidra.formats.gfilesystem.FSRL;
Expand All @@ -26,14 +27,13 @@
import ghidra.formats.gfilesystem.factory.GFileSystemProbeBytesOnly;
import ghidra.util.exception.CancelledException;
import ghidra.util.task.TaskMonitor;
import utilities.util.ArrayUtilities;

public class CBFSFileSystemFactory implements GFileSystemFactoryByteProvider<CBFSFileSystem>,
GFileSystemProbeBytesOnly {
@Override
public boolean probeStartBytes(FSRL containerFSRL, byte[] startBytes) {
return ArrayUtilities.arrayRangesEquals(CBFSConstants.CBFS_FILE_SIGNATURE, 0, startBytes, 0,
CBFSConstants.CBFS_FILE_SIGNATURE.length);
return Arrays.equals(startBytes, 0, CBFSConstants.CBFS_FILE_SIGNATURE.length,
CBFSConstants.CBFS_FILE_SIGNATURE, 0, CBFSConstants.CBFS_FILE_SIGNATURE.length);
}

@Override
Expand Down

0 comments on commit 3ca3f5a

Please sign in to comment.