mirror of
https://github.com/revanced/smali.git
synced 2025-05-23 18:16:23 +02:00
ensure the string index is <= 0xFFFF before writing a string-const instruction
git-svn-id: https://smali.googlecode.com/svn/trunk@504 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
parent
d6a7a212e0
commit
f6c7706102
@ -69,6 +69,10 @@ public class Instruction21c extends InstructionWithReference implements SingleRe
|
||||
}
|
||||
|
||||
protected void writeInstruction(AnnotatedOutput out, int currentCodeOffset) {
|
||||
if(opcode == Opcode.CONST_STRING && getReferencedItem().getIndex() > 0xFFFF) {
|
||||
throw new RuntimeException("String offset is too large for const-string. Use string-const/jumbo instead.");
|
||||
}
|
||||
|
||||
out.writeByte(opcode.value);
|
||||
out.writeByte(regA);
|
||||
out.writeShort(getReferencedItem().getIndex());
|
||||
|
Loading…
x
Reference in New Issue
Block a user