You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
api-impl/android/content/res/AssetManager: fix infinite loop with suspicious self-referencing arsc entries
This commit is contained in:
@@ -212,6 +212,10 @@ public final class AssetManager {
|
|||||||
return "";
|
return "";
|
||||||
ResValue resValue = tableBlockSearch(id).pickOne().getResValue();
|
ResValue resValue = tableBlockSearch(id).pickOne().getResValue();
|
||||||
if (resValue.getValueType() == ValueType.REFERENCE) {
|
if (resValue.getValueType() == ValueType.REFERENCE) {
|
||||||
|
if(id == resValue.getData()) {
|
||||||
|
System.out.println("getResourceText: self-reference... returing \"\"");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
return getResourceText(resValue.getData());
|
return getResourceText(resValue.getData());
|
||||||
}
|
}
|
||||||
return resValue.getDataAsPoolString().get();
|
return resValue.getDataAsPoolString().get();
|
||||||
|
|||||||
Reference in New Issue
Block a user