Merge "entry_name_utils-inl.h: clear top bit before shifting"
am: a72477630d
Change-Id: I6d61bee38676e1f55cd3593b2186b9f1bc4dc6e0
diff --git a/libziparchive/entry_name_utils-inl.h b/libziparchive/entry_name_utils-inl.h
index 5fc2fb4..1714586 100644
--- a/libziparchive/entry_name_utils-inl.h
+++ b/libziparchive/entry_name_utils-inl.h
@@ -35,7 +35,7 @@
return false;
} else {
// 2-5 byte sequences.
- for (uint8_t first = byte << 1; first & 0x80; first <<= 1) {
+ for (uint8_t first = (byte & 0x7f) << 1; first & 0x80; first = (first & 0x7f) << 1) {
++i;
// Missing continuation byte..