From 3ca3f5af3d9fe8749191ae903820be9bd47b7837 Mon Sep 17 00:00:00 2001 From: Alex James Date: Mon, 25 Apr 2022 20:08:39 -0500 Subject: [PATCH] cbfs: Replace ArrayUtilities.arrayRangesEquals with Arrays.equals Partially addresses #20. --- src/main/java/firmware/cbfs/CBFSFileSystemFactory.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/firmware/cbfs/CBFSFileSystemFactory.java b/src/main/java/firmware/cbfs/CBFSFileSystemFactory.java index 807d747..4833297 100644 --- a/src/main/java/firmware/cbfs/CBFSFileSystemFactory.java +++ b/src/main/java/firmware/cbfs/CBFSFileSystemFactory.java @@ -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; @@ -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, 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