Index: base/pickle.h |
=================================================================== |
--- base/pickle.h (revision 65620) |
+++ base/pickle.h (working copy) |
@@ -177,10 +177,12 @@ |
// Returns the address of the byte immediately following the currently valid |
// header + payload. |
char* end_of_payload() { |
+ // We must have a valid header_. |
return payload() + payload_size(); |
} |
const char* end_of_payload() const { |
- return payload() + payload_size(); |
+ // This object may be invalid. |
+ return header_ ? payload() + payload_size() : NULL; |
} |
size_t capacity() const { |