| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "chrome/browser/safe_browsing/safe_browsing_util.h" | 5 #include "chrome/browser/safe_browsing/safe_browsing_util.h" |
| 6 | 6 |
| 7 #include "base/hmac.h" | 7 #include "base/hmac.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/sha2.h" | 9 #include "base/sha2.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 | 608 |
| 609 // Validate that the next entry is wholly contained inside of |data_|. | 609 // Validate that the next entry is wholly contained inside of |data_|. |
| 610 const char* end = data_.get() + size_; | 610 const char* end = data_.get() + size_; |
| 611 if (next + SBEntry::kMinSize <= end && next + next_entry->Size() <= end) { | 611 if (next + SBEntry::kMinSize <= end && next + next_entry->Size() <= end) { |
| 612 *entry = next_entry; | 612 *entry = next_entry; |
| 613 return true; | 613 return true; |
| 614 } | 614 } |
| 615 | 615 |
| 616 return false; | 616 return false; |
| 617 } | 617 } |
| 618 | |
| OLD | NEW |