diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/MetaInfo.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/MetaInfo.java index 65f35a36ef..4bb9e6cf6e 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/MetaInfo.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/MetaInfo.java @@ -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 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) {