Merge remote-tracking branch 'origin/GP-0_Dan_testFixes20211126-2' into Ghidra_10.1

This commit is contained in:
Ryan Kurtz
2021-11-26 13:37:34 -05:00

View File

@@ -212,10 +212,13 @@ public class SemisparseByteArray {
*/
public synchronized void putData(final long loc, final byte[] data, final int offset,
final int length) {
if (length == 0) {
return;
}
if (length < 0) {
throw new IllegalArgumentException("length: " + length);
}
if (Long.compareUnsigned(loc + length, loc) < 0) {
if (Long.compareUnsigned(loc + length - 1, loc) < 0) {
throw new IndexOutOfBoundsException("given offset and length would exceed ULONG_MAX");
}
UnsignedLong uLoc = UnsignedLong.fromLongBits(loc);