mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-05 17:45:52 +01:00
fix: support 10mb apktool.yml parsing (#3015)
This commit is contained in:
parent
1d60523cae
commit
9153a272d3
@ -17,6 +17,7 @@
|
||||
package brut.androlib.meta;
|
||||
|
||||
import org.yaml.snakeyaml.DumperOptions;
|
||||
import org.yaml.snakeyaml.LoaderOptions;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
import org.yaml.snakeyaml.introspector.PropertyUtils;
|
||||
|
||||
@ -40,14 +41,17 @@ public class MetaInfo {
|
||||
public Collection<String> doNotCompress;
|
||||
|
||||
private static Yaml getYaml() {
|
||||
DumperOptions options = new DumperOptions();
|
||||
options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
|
||||
DumperOptions dumpOptions = new DumperOptions();
|
||||
dumpOptions.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
|
||||
|
||||
EscapedStringRepresenter representer = new EscapedStringRepresenter();
|
||||
PropertyUtils propertyUtils = representer.getPropertyUtils();
|
||||
propertyUtils.setSkipMissingProperties(true);
|
||||
|
||||
return new Yaml(new ClassSafeConstructor(), representer, options);
|
||||
LoaderOptions loaderOptions = new LoaderOptions();
|
||||
loaderOptions.setCodePointLimit(10 * 1024 * 1024); // 10mb
|
||||
|
||||
return new Yaml(new ClassSafeConstructor(), representer, dumpOptions, loaderOptions);
|
||||
}
|
||||
|
||||
public void save(Writer output) {
|
||||
|
Loading…
Reference in New Issue
Block a user