Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Side by Side Diff: base/pickle.h

Issue 6353010: Check that we've got a complete header before accessing its fields. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/pickle.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_PICKLE_H__ 5 #ifndef BASE_PICKLE_H__
6 #define BASE_PICKLE_H__ 6 #define BASE_PICKLE_H__
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 229
230 private: 230 private:
231 Header* header_; 231 Header* header_;
232 size_t header_size_; // Supports extra data between header and payload. 232 size_t header_size_; // Supports extra data between header and payload.
233 // Allocation size of payload (or -1 if allocation is const). 233 // Allocation size of payload (or -1 if allocation is const).
234 size_t capacity_; 234 size_t capacity_;
235 size_t variable_buffer_offset_; // IF non-zero, then offset to a buffer. 235 size_t variable_buffer_offset_; // IF non-zero, then offset to a buffer.
236 236
237 FRIEND_TEST_ALL_PREFIXES(PickleTest, Resize); 237 FRIEND_TEST_ALL_PREFIXES(PickleTest, Resize);
238 FRIEND_TEST_ALL_PREFIXES(PickleTest, FindNext); 238 FRIEND_TEST_ALL_PREFIXES(PickleTest, FindNext);
239 FRIEND_TEST_ALL_PREFIXES(PickleTest, FindNextWithIncompleteHeader);
239 FRIEND_TEST_ALL_PREFIXES(PickleTest, IteratorHasRoom); 240 FRIEND_TEST_ALL_PREFIXES(PickleTest, IteratorHasRoom);
240 }; 241 };
241 242
242 #endif // BASE_PICKLE_H__ 243 #endif // BASE_PICKLE_H__
OLDNEW
« no previous file with comments | « no previous file | base/pickle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698