Pebble: skip .js file if too large instead of breaking installation

(Hotfix)
here
Andreas Shimokawa 2016-03-03 17:46:58 +01:00
parent aba21d3ab7
commit f616e4f571
1 changed files with 4 additions and 2 deletions

View File

@ -216,8 +216,10 @@ public class PBWReader {
} else if (fileName.equals("pebble-js-app.js")) {
LOG.info("Found JS file: app supports configuration.");
long bytes = ze.getSize();
if (bytes > 65536) // that should be too much
break;
if (bytes > 65536) {
LOG.info("size exceeding 64k, skipping");
continue;
}
ByteArrayOutputStream baos = new ByteArrayOutputStream();
while ((count = zis.read(buffer)) != -1) {