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

Side by Side Diff: src/woff2.cc

Issue 16310007: [OTS] Fix assertion failure on Windows debug build (Closed) Base URL: http://ots.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 6 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 | test/file-stream.h » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 // This is the implementation of decompression of the proposed WOFF Ultra 5 // This is the implementation of decompression of the proposed WOFF Ultra
6 // Condensed file format. 6 // Condensed file format.
7 7
8 #include <cassert> 8 #include <cassert>
9 #include <cstdlib> 9 #include <cstdlib>
10 #include <vector> 10 #include <vector>
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 std::memcpy(result + table->dst_offset, transform_buf, 1018 std::memcpy(result + table->dst_offset, transform_buf,
1019 transform_length); 1019 transform_length);
1020 } else { 1020 } else {
1021 if (!ReconstructTransformed(tables, table->tag, 1021 if (!ReconstructTransformed(tables, table->tag,
1022 transform_buf, transform_length, result, result_length)) { 1022 transform_buf, transform_length, result, result_length)) {
1023 return OTS_FAILURE(); 1023 return OTS_FAILURE();
1024 } 1024 }
1025 } 1025 }
1026 if (continue_valid) { 1026 if (continue_valid) {
1027 transform_buf += transform_length; 1027 transform_buf += transform_length;
1028 if (transform_buf > &uncompressed_buf[uncompressed_buf.size()]) { 1028 if (transform_buf > &uncompressed_buf[0] + uncompressed_buf.size()) {
1029 return OTS_FAILURE(); 1029 return OTS_FAILURE();
1030 } 1030 }
1031 } 1031 }
1032 } 1032 }
1033 1033
1034 return FixChecksums(tables, result); 1034 return FixChecksums(tables, result);
1035 } 1035 }
1036 1036
1037 } // namespace ots 1037 } // namespace ots
OLDNEW
« no previous file with comments | « no previous file | test/file-stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698