mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-27 23:17:03 +08:00
GT-2495: Fixing Python Interpreter OutOfMemoryError when reading in
large strings longer than 8192 characters.
This commit is contained in:
+4
-4
@@ -679,14 +679,14 @@ public class InterpreterPanel extends JPanel implements OptionsChangeListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (bytes != null) {
|
if (bytes != null) {
|
||||||
int length = Math.min(bytes.length, len);
|
int length = Math.min(bytes.length - position, len);
|
||||||
System.arraycopy(bytes, 0, b, off, length);
|
System.arraycopy(bytes, position, b, off, length);
|
||||||
if (length == bytes.length) {
|
if (position + length == bytes.length) {
|
||||||
position = 0;
|
position = 0;
|
||||||
bytes = null;
|
bytes = null;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
position = b.length;
|
position += length;
|
||||||
}
|
}
|
||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user