| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
LGTM!
It is wild that we have this workaround in Chrome rather than in Android. Workarounds for hardware/driver bugs in every app just doesn't scale. :(
bool expect_0_byte = false;
for (uint8_t byte : bytes) {optional: This seems more complicated than necessary. We can only have the second block:
```
bool seen_0_bit = false;
for (uint8_t byte : bytes) {
for (uint8_t bit = 128u; bit != 0; bit >>= 1) {
if (seen_0_bit && (byte & bit) != 0) {
return false;
}
if ((byte & bit) == 0) {
seen_0_bit = true;
}
}
}
```
I think implicitly separating out the ==0, ==0xFF, and other cases makes things strictly more complicated, and as this is single-use test-only code, perf doesn't matter.
CheckBytesExist(base::as_bytes(base::span_from_ref(as_in->sin_addr)));optional: Should we call this on the mask, too? That protects us against two things: Under bytes that IPEndPoint::FromSocketAddr() doesn't read being left unset (when run with memory sanitizers), and anything after the address not being allocated (which I guess may only be sin6_scope_id)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |