OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "mojo/public/cpp/bindings/lib/validation_util.h" | 5 #include "mojo/public/cpp/bindings/lib/validation_util.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "mojo/public/cpp/bindings/lib/bindings_serialization.h" | 9 #include "mojo/public/cpp/bindings/lib/bindings_serialization.h" |
10 #include "mojo/public/cpp/bindings/lib/message_internal.h" | 10 #include "mojo/public/cpp/bindings/lib/message_internal.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
127 } | 127 } |
128 | 128 |
129 bool ValidateAssociatedInterfaceId(InterfaceId input) { | 129 bool ValidateAssociatedInterfaceId(InterfaceId input) { |
130 if (!IsMasterInterfaceId(input)) | 130 if (!IsMasterInterfaceId(input)) |
131 return true; | 131 return true; |
132 | 132 |
133 ReportValidationError(VALIDATION_ERROR_ILLEGAL_INTERFACE_ID); | 133 ReportValidationError(VALIDATION_ERROR_ILLEGAL_INTERFACE_ID); |
134 return false; | 134 return false; |
135 } | 135 } |
136 | 136 |
137 bool ValidateNative(const NativePointer& input, BoundsChecker* bounds_checker) { | |
138 if (!ValidateEncodedPointer(&input.offset)) { | |
139 ReportValidationError(VALIDATION_ERROR_ILLEGAL_POINTER); | |
140 return false; | |
141 } | |
142 | |
143 return true; | |
yzshen1
2015/12/15 21:20:27
I think here we need to use the Validate() of Arra
Ken Rockot(use gerrit already)
2015/12/15 23:31:07
Done.
| |
144 } | |
145 | |
137 } // namespace internal | 146 } // namespace internal |
138 } // namespace mojo | 147 } // namespace mojo |
OLD | NEW |