Fix typos in parse_context.h.

PiperOrigin-RevId: 645498562
pull/17210/head
Protobuf Team Bot 5 months ago committed by Copybara-Service
parent 7d395b8973
commit 0302c4c438
  1. 8
      src/google/protobuf/parse_context.h

@ -112,7 +112,7 @@ class PROTOBUF_EXPORT EpsCopyInputStream {
// In sanitizer mode we use memory poisoning to guarantee that:
// - We do not read an uninitialized token.
// - We would like to verify that this token was consumed, but unforuntately
// - We would like to verify that this token was consumed, but unfortunately
// __asan_address_is_poisoned is allowed to have false negatives.
class LimitToken {
public:
@ -256,9 +256,9 @@ class PROTOBUF_EXPORT EpsCopyInputStream {
bool DataAvailable(const char* ptr) { return ptr < limit_end_; }
protected:
// Returns true is limit (either an explicit limit or end of stream) is
// Returns true if limit (either an explicit limit or end of stream) is
// reached. It aligns *ptr across buffer seams.
// If limit is exceeded it returns true and ptr is set to null.
// If limit is exceeded, it returns true and ptr is set to null.
bool DoneWithCheck(const char** ptr, int d) {
ABSL_DCHECK(*ptr);
if (PROTOBUF_PREDICT_TRUE(*ptr < limit_end_)) return false;
@ -266,7 +266,7 @@ class PROTOBUF_EXPORT EpsCopyInputStream {
ABSL_DCHECK_LE(overrun, kSlopBytes); // Guaranteed by parse loop.
if (overrun ==
limit_) { // No need to flip buffers if we ended on a limit.
// If we actually overrun the buffer and next_chunk_ is null. It means
// If we actually overrun the buffer and next_chunk_ is null, it means
// the stream ended and we passed the stream end.
if (overrun > 0 && next_chunk_ == nullptr) *ptr = nullptr;
return true;

Loading…
Cancel
Save