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

Unified Diff: net/der/input.cc

Issue 1160643002: Remove dangerous std::string constructor for der::Input (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove FromCString; use uint8_t array literals instead of string literals now Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: net/der/input.cc
diff --git a/net/der/input.cc b/net/der/input.cc
index 004034e3ecd17cd93b8f87c040c3f5441fb0714b..45edfdcca67fde5ad002f151d6f2deb7e39c0870 100644
--- a/net/der/input.cc
+++ b/net/der/input.cc
@@ -17,10 +17,6 @@ Input::Input() : data_(nullptr), len_(0) {
Input::Input(const uint8_t* data, size_t len) : data_(data), len_(len) {
}
-Input::Input(const std::string& s)
- : data_(reinterpret_cast<const uint8_t*>(s.data())), len_(s.size()) {
-}
-
bool Input::Equals(const Input& other) const {
if (len_ != other.len_)
return false;
« no previous file with comments | « net/der/input.h ('k') | net/der/input_unittest.cc » ('j') | net/der/parse_values_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698