Merge RP1A.200123.001

Change-Id: I72458574aa3624e1c6c16d740b0a63abc3f7f294
diff --git a/BUILD.gn b/BUILD.gn
index 3157419..43468c5 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -27,8 +27,13 @@
 pkg_config("target_defaults") {
   pkg_deps = [
     "libchrome-${libbase_ver}",
-    "protobuf-lite",
   ]
+  if (use.fuzzer) {
+    # Link against protobuf for fuzzers so we can use libprotobuf-mutator.
+    pkg_deps += [ "protobuf" ]
+  } else {
+    pkg_deps += [ "protobuf-lite" ]
+  }
   cflags = [ "-Wextra" ]
   cflags_cc = [ "-Wnon-virtual-dtor" ]
   include_dirs = [ "src/include" ]
diff --git a/src/utils.cc b/src/utils.cc
index 708684d..d0aece0 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -244,7 +244,7 @@
 bool LocateDeflatesInZipArchive(const Buffer& data,
                                 vector<BitExtent>* deflates) {
   uint64_t pos = 0;
-  while (pos <= data.size() - 30) {
+  while (pos + 30 <= data.size()) {
     // TODO(xunchang) add support for big endian system when searching for
     // magic numbers.
     if (get_unaligned<uint32_t>(data.data() + pos) != 0x04034b50) {