fix: overlay spec parsing (#2805) (#2917)

This commit is contained in:
Dominic Lemire 2022-11-02 03:56:49 -07:00 committed by GitHub
parent 9db742618b
commit f8df056a2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -178,7 +178,19 @@ public class ARSCDecoder {
nextChunk();
}
private void readOverlaySpec() throws IOException {
private void readOverlaySpec() throws AndrolibException, IOException {
checkChunkType(Header.XML_TYPE_OVERLAY);
String name = mIn.readNullEndedString(128, true);
String actor = mIn.readNullEndedString(128, true);
LOGGER.fine(String.format("Overlay name: \"%s\", actor: \"%s\")", name, actor));
while(nextChunk().type == Header.XML_TYPE_OVERLAY_POLICY) {
readOverlayPolicySpec();
}
}
private void readOverlayPolicySpec() throws AndrolibException, IOException {
checkChunkType(Header.XML_TYPE_OVERLAY_POLICY);
/* policyFlags */mIn.skipInt();
int count = mIn.readInt();