Merge remote-tracking branch 'origin/GP-6713_dev747368_btreerootnode--SQUASHED'

This commit is contained in:
Ryan Kurtz
2026-04-20 13:40:01 -04:00
2 changed files with 14 additions and 8 deletions
@@ -25,7 +25,10 @@ public class BTreeRootNodeDescriptor extends BTreeNodeDescriptor {
nodes.add( this );
int nodeSize = headerRecord.getNodeSize() & 0xffff;
int nodeSize = Short.toUnsignedInt(headerRecord.getNodeSize());
if (nodeSize == 0) {
throw new IOException("Bad nodeSize: " + nodeSize);
}
for ( int i = nodeSize ; i < reader.length() ; i += nodeSize ) {
reader.setPointerIndex( i );
@@ -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.
@@ -15,15 +15,15 @@
*/
package ghidra.file.formats.ios.btree;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import ghidra.app.util.bin.BinaryReader;
import ghidra.app.util.bin.StructConverterUtil;
import ghidra.program.model.data.DataType;
import ghidra.util.exception.DuplicateNameException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class BTreeRootNodeDescriptor extends BTreeNodeDescriptor {
private BTreeHeaderRecord headerRecord;
@@ -40,7 +40,10 @@ public class BTreeRootNodeDescriptor extends BTreeNodeDescriptor {
nodes.add( this );
int nodeSize = headerRecord.getNodeSize() & 0xffff;
int nodeSize = Short.toUnsignedInt(headerRecord.getNodeSize());
if (nodeSize == 0) {
throw new IOException("Bad nodeSize: " + nodeSize);
}
for ( int i = nodeSize ; i < reader.length() ; i += nodeSize ) {
reader.setPointerIndex( i );