aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-07-15 00:02:12 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-07-15 00:02:12 +0000
commit9bb8878c3717a43d3cd42283334c8500b3cd3a36 (patch)
tree72b8f46dd035d6d0debc64ff5ba6f6146cc29daa
parentf41ef119872c6595e7711ca9346131eb8d40ac8f (diff)
parent36ec8d2e399811a221241a6c7473d3b780e9ef6d (diff)
downloadpuffin-android12-mainline-wifi-release.tar.gz
Change-Id: I0aaa3ecf58f872695f59fb704bc41c11eb89b523
-rw-r--r--Android.bp17
-rw-r--r--BUILD.gn4
-rw-r--r--METADATA3
l---------puffin1
l---------puffin/src1
-rw-r--r--src/puffdiff.cc4
6 files changed, 26 insertions, 4 deletions
diff --git a/Android.bp b/Android.bp
index e66a2ac..f49c69b 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,3 +1,20 @@
+package {
+ default_applicable_licenses: ["external_puffin_license"],
+}
+
+// Added automatically by a large-scale-change
+// See: http://go/android-license-faq
+license {
+ name: "external_puffin_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-BSD",
+ ],
+ license_text: [
+ "LICENSE",
+ ],
+}
+
cc_defaults {
name: "puffin_defaults",
host_supported: true,
diff --git a/BUILD.gn b/BUILD.gn
index 43468c5..460aa58 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -26,7 +26,7 @@ group("all") {
pkg_config("target_defaults") {
pkg_deps = [
- "libchrome-${libbase_ver}",
+ "libchrome",
]
if (use.fuzzer) {
# Link against protobuf for fuzzers so we can use libprotobuf-mutator.
@@ -104,7 +104,7 @@ static_library("libpuffdiff") {
pkg_config("libbrillo") {
pkg_deps = [
- "libbrillo-${libbase_ver}",
+ "libbrillo",
]
}
diff --git a/METADATA b/METADATA
new file mode 100644
index 0000000..d97975c
--- /dev/null
+++ b/METADATA
@@ -0,0 +1,3 @@
+third_party {
+ license_type: NOTICE
+}
diff --git a/puffin b/puffin
deleted file mode 120000
index 945c9b4..0000000
--- a/puffin
+++ /dev/null
@@ -1 +0,0 @@
-. \ No newline at end of file
diff --git a/puffin/src b/puffin/src
new file mode 120000
index 0000000..5cd551c
--- /dev/null
+++ b/puffin/src
@@ -0,0 +1 @@
+../src \ No newline at end of file
diff --git a/src/puffdiff.cc b/src/puffdiff.cc
index 9e3de72..15d0fa6 100644
--- a/src/puffdiff.cc
+++ b/src/puffdiff.cc
@@ -68,7 +68,9 @@ bool CreatePatch(const Buffer& bsdiff_patch,
header.mutable_src()->set_puff_length(src_puff_size);
header.mutable_dst()->set_puff_length(dst_puff_size);
- const uint32_t header_size = header.ByteSize();
+ const size_t header_size_long = header.ByteSizeLong();
+ TEST_AND_RETURN_FALSE(header_size_long <= UINT32_MAX);
+ const uint32_t header_size = header_size_long;
uint64_t offset = 0;
patch->resize(kMagicLength + sizeof(header_size) + header_size +