1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-28 12:56:49 +01:00

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

(Hotfix)
This commit is contained in:
Andreas Shimokawa 2016-03-03 17:46:58 +01:00
parent aba21d3ab7
commit f616e4f571

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) {