| 170 | } |
| 171 | |
| 172 | const char* GetLengthPrefixedSlice(const char* p, const char* limit, |
| 173 | Slice* result) { |
| 174 | uint32_t len; |
| 175 | p = GetVarint32Ptr(p, limit, &len); |
| 176 | if (p == NULL) return NULL; |
| 177 | if (p + len > limit) return NULL; |
| 178 | *result = Slice(p, len); |
| 179 | return p + len; |
| 180 | } |
| 181 | |
| 182 | bool GetLengthPrefixedSlice(Slice* input, Slice* result) { |
| 183 | uint32_t len; |