Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-796 Fixing broken tests in ResourceDataTypesTest, ControlFlowGuardTest and PE_ResourceTest

jmlagor3c34eecca172
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/ImageRuntimeFunctionEntries.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/ImageRuntimeFunctionEntries.java
index 7a372d9d19..32c5e38bbb 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/ImageRuntimeFunctionEntries.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/ImageRuntimeFunctionEntries.java
@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -155,8 +155,8 @@ public class ImageRuntimeFunctionEntries {
unwindInfo.version = (byte) (splitByte & UNWIND_INFO_VERSION_BITMASK);
unwindInfo.flags = (byte) (splitByte >> UNWIND_INFO_FLAGS_SHIFT);
- unwindInfo.sizeOfProlog = reader.readNextByte();
- unwindInfo.countOfUnwindCodes = reader.readNextByte();
+ unwindInfo.sizeOfProlog = reader.readNextUnsignedByte();
+ unwindInfo.countOfUnwindCodes = reader.readNextUnsignedByte();
splitByte = reader.readNextByte();
unwindInfo.frameRegister = (byte) (splitByte & UNWIND_INFO_FRAME_REGISTER_MASK);
@@ -307,8 +307,8 @@ public class ImageRuntimeFunctionEntries {
byte version;
byte flags;
- byte sizeOfProlog;
- byte countOfUnwindCodes;
+ int sizeOfProlog;
+ int countOfUnwindCodes;
byte frameRegister;
byte frameOffset;
UNWIND_CODE[] unwindCodes;
diff --git a/Ghidra/Features/Base/src/test/java/ghidra/app/util/bin/format/pe/cli/streams/CliStreamStringsTest.java b/Ghidra/Features/Base/src/test/java/ghidra/app/util/bin/format/cli/streams/CliStreamStringsTest.java
similarity index 98%
rename from Ghidra/Features/Base/src/test/java/ghidra/app/util/bin/format/pe/cli/streams/CliStreamStringsTest.java
rename to Ghidra/Features/Base/src/test/java/ghidra/app/util/bin/format/cli/streams/CliStreamStringsTest.java
index 4f418ccff1..e03b12b508 100644
--- a/Ghidra/Features/Base/src/test/java/ghidra/app/util/bin/format/pe/cli/streams/CliStreamStringsTest.java
+++ b/Ghidra/Features/Base/src/test/java/ghidra/app/util/bin/format/cli/streams/CliStreamStringsTest.java
@@ -4,16 +4,16 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package ghidra.app.util.bin.format.pe.cli.streams;
+package ghidra.app.util.bin.format.cli.streams;
import static org.junit.Assert.*;
@@ -26,6 +26,7 @@ import generic.test.AbstractGTest;
import ghidra.app.util.bin.BinaryReader;
import ghidra.app.util.bin.ByteArrayProvider;
import ghidra.app.util.bin.format.pe.cli.CliStreamHeader;
+import ghidra.app.util.bin.format.pe.cli.streams.CliStreamStrings;
import ghidra.util.LittleEndianDataConverter;
public class CliStreamStringsTest extends AbstractGTest {