| 143 | } |
| 144 | |
| 145 | const char* GetLengthPrefixedSlice(const char* p, const char* limit, |
| 146 | Slice* result) { |
| 147 | uint32_t len; |
| 148 | p = GetVarint32Ptr(p, limit, &len); |
| 149 | if (p == nullptr) return nullptr; |
| 150 | if (p + len > limit) return nullptr; |
| 151 | *result = Slice(p, len); |
| 152 | return p + len; |
| 153 | } |
| 154 | |
| 155 | bool GetLengthPrefixedSlice(Slice* input, Slice* result) { |
| 156 | uint32_t len; |