diff options
Diffstat (limited to 'webkit/plugins/ppapi/npapi_glue.cc')
-rw-r--r-- | webkit/plugins/ppapi/npapi_glue.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/webkit/plugins/ppapi/npapi_glue.cc b/webkit/plugins/ppapi/npapi_glue.cc index 112c42e..b2eacb4 100644 --- a/webkit/plugins/ppapi/npapi_glue.cc +++ b/webkit/plugins/ppapi/npapi_glue.cc @@ -51,7 +51,9 @@ bool PPVarToNPVariant(PP_Var var, NPVariant* result) { return false; } const std::string& value = string->value(); - STRINGN_TO_NPVARIANT(base::strdup(value.c_str()), value.size(), *result); + char* c_string = static_cast<char*>(malloc(value.size())); + memcpy(c_string, value.data(), value.size()); + STRINGN_TO_NPVARIANT(c_string, value.size(), *result); break; } case PP_VARTYPE_OBJECT: { |