diff --git a/chrome/android/webapk/libs/client/src/org/chromium/webapk/lib/client/WebApkVerifySignature.java b/chrome/android/webapk/libs/client/src/org/chromium/webapk/lib/client/WebApkVerifySignature.java index 3728f27dcfd48..5f0f061ba80e7 100644 --- a/chrome/android/webapk/libs/client/src/org/chromium/webapk/lib/client/WebApkVerifySignature.java +++ b/chrome/android/webapk/libs/client/src/org/chromium/webapk/lib/client/WebApkVerifySignature.java @@ -83,8 +83,9 @@ public class WebApkVerifySignature { /** Maximum file comment length permitted. */ private static final int MAX_FILE_COMMENT_LENGTH = 0; - /** Maximum extra field length permitted. */ - private static final int MAX_EXTRA_LENGTH = 8; + /** Maximum extra field length permitted. + * Support .so alignment and a 64 bytes bytes for any extras. */ + private static final int MAX_EXTRA_LENGTH = 4096 + 64; /** The memory buffer we are going to read the zip from. */ private final ByteBuffer mBuffer; diff --git a/chrome/test/data/webapks/extra-field-too-large.apk b/chrome/test/data/webapks/extra-field-too-large.apk index a996735d96032..ac0c061a6983e 100644 Binary files a/chrome/test/data/webapks/extra-field-too-large.apk and b/chrome/test/data/webapks/extra-field-too-large.apk differ