Skip to content

Commit

Permalink
Add new limits for extra field, updated test file.
Browse files Browse the repository at this point in the history
Bug: 775160
Change-Id: Ic0f2a818386c78cf7b610035f7841f08e5477ab9
Reviewed-on: https://chromium-review.googlesource.com/723783
Reviewed-by: Peter Kotwicz <pkotwicz@chromium.org>
Commit-Queue: Scott Kirkwood <scottkirkwood@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509491}
  • Loading branch information
Scott Kirkwood authored and Commit Bot committed Oct 17, 2017
1 parent c58b83f commit 8c0020b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Binary file modified chrome/test/data/webapks/extra-field-too-large.apk
Binary file not shown.

0 comments on commit 8c0020b

Please sign in to comment.