client: fix custom_js having no null-terminator

By constructing CefString with an explicit length
This commit is contained in:
Adam
2025-08-28 09:56:58 +01:00
parent f2b60c1c49
commit 208d97e55a

View File

@@ -430,7 +430,7 @@ bool Browser::Client::IPCHandleMessage(int fd) {
.resizeable = true,
.frame = true,
.has_custom_js = true,
.custom_js = CefString(custom_js),
.custom_js = CefString(custom_js, header.custom_js_length),
};
plugin->windows.push_back(new Browser::PluginWindow(this, details, url, plugin, fd, &this->send_lock, header.window_id, header.plugin_id, false));
delete[] url;