idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
21,600
cached_NPN_IdentifierIsString(NPIdentifier ident) { #if USE_NPIDENTIFIER_CACHE if (use_npidentifier_cache()) { NPIdentifierInfo *npi = npidentifier_cache_lookup(ident); if (npi) return npi->string_len > 0; } #endif /* cache update is postponed to actual NPN_UTF8FromIdentifier() or NPN_IntFromIdentifier() */ return invoke_NPN_IdentifierIsString(ident); }
Bypass
0
cached_NPN_IdentifierIsString(NPIdentifier ident) { #if USE_NPIDENTIFIER_CACHE if (use_npidentifier_cache()) { NPIdentifierInfo *npi = npidentifier_cache_lookup(ident); if (npi) return npi->string_len > 0; } #endif /* cache update is postponed to actual NPN_UTF8FromIdentifier() or NPN_IntFromIdentifier() */ return invoke_NPN_IdentifierIsString(ident); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,601
cached_NPN_IntFromIdentifier(NPIdentifier identifier) { int32_t value; if (!use_npidentifier_cache()) value = invoke_NPN_IntFromIdentifier(identifier); else { #if USE_NPIDENTIFIER_CACHE NPIdentifierInfo *npi = npidentifier_cache_lookup(identifier); if (npi) { assert(npi->string_len == 0); value = npi->u.value; } else { value = invoke_NPN_IntFromIdentifier(identifier); npidentifier_cache_reserve(1); npidentifier_cache_add_int(identifier, value); } #endif } return value; }
Bypass
0
cached_NPN_IntFromIdentifier(NPIdentifier identifier) { int32_t value; if (!use_npidentifier_cache()) value = invoke_NPN_IntFromIdentifier(identifier); else { #if USE_NPIDENTIFIER_CACHE NPIdentifierInfo *npi = npidentifier_cache_lookup(identifier); if (npi) { assert(npi->string_len == 0); value = npi->u.value; } else { value = invoke_NPN_IntFromIdentifier(identifier); npidentifier_cache_reserve(1); npidentifier_cache_add_int(identifier, value); } #endif } return value; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,602
cached_NPN_UTF8FromIdentifier(NPIdentifier identifier) { NPUTF8 *str; if (!use_npidentifier_cache()) str = invoke_NPN_UTF8FromIdentifier(identifier); else { #if USE_NPIDENTIFIER_CACHE str = npidentifier_cache_get_string_copy(identifier); if (str == NULL) { str = invoke_NPN_UTF8FromIdentifier(identifier); npidentifier_cache_reserve(1); npidentifier_cache_add_string(identifier, str); } #endif } return str; }
Bypass
0
cached_NPN_UTF8FromIdentifier(NPIdentifier identifier) { NPUTF8 *str; if (!use_npidentifier_cache()) str = invoke_NPN_UTF8FromIdentifier(identifier); else { #if USE_NPIDENTIFIER_CACHE str = npidentifier_cache_get_string_copy(identifier); if (str == NULL) { str = invoke_NPN_UTF8FromIdentifier(identifier); npidentifier_cache_reserve(1); npidentifier_cache_add_string(identifier, str); } #endif } return str; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,603
static int create_window(PluginInstance *plugin, NPWindow *window) { if (plugin->is_windowless) { destroy_window_attributes(plugin->window.ws_info); plugin->window.ws_info = NULL; } assert(plugin->window.ws_info == NULL); NPSetWindowCallbackStruct *ws_info; if ((ws_info = NPW_MemClone(NPSetWindowCallbackStruct, window->ws_info)) == NULL) return -1; if (create_window_attributes(ws_info) < 0) return -1; memcpy(&plugin->window, window, sizeof(*window)); window = &plugin->window; window->ws_info = ws_info; fixup_size_hints(plugin); if (plugin->is_windowless) return 0; if (plugin->use_xembed) { GtkData *toolkit = calloc(1, sizeof(*toolkit)); if (toolkit == NULL) return -1; toolkit->container = gtk_plug_new((GdkNativeWindow)window->window); if (toolkit->container == NULL) return -1; gtk_widget_set_size_request(toolkit->container, window->width, window->height); gtk_widget_show(toolkit->container); toolkit->socket = gtk_socket_new(); if (toolkit->socket == NULL) return -1; gtk_widget_show(toolkit->socket); gtk_container_add(GTK_CONTAINER(toolkit->container), toolkit->socket); gtk_widget_show_all(toolkit->container); window->window = (void *)gtk_socket_get_id(GTK_SOCKET(toolkit->socket)); plugin->toolkit_data = toolkit; #if USE_XEMBED_HACK g_signal_connect(toolkit->container, "delete-event", G_CALLBACK(gtk_true), NULL); #endif g_signal_connect(toolkit->container, "destroy", G_CALLBACK(gtk_widget_destroyed), &toolkit->container); g_signal_connect(toolkit->socket, "plug_removed", G_CALLBACK(gtk_true), NULL); return 0; } XtData *toolkit = calloc(1, sizeof(*toolkit)); if (toolkit == NULL) return -1; String app_name, app_class; XtGetApplicationNameAndClass(x_display, &app_name, &app_class); Widget top_widget = XtVaAppCreateShell("drawingArea", app_class, topLevelShellWidgetClass, x_display, XtNoverrideRedirect, True, XtNborderWidth, 0, XtNbackgroundPixmap, None, XtNwidth, window->width, XtNheight, window->height, NULL); Widget form = XtVaCreateManagedWidget("form", compositeWidgetClass, top_widget, XtNdepth, ws_info->depth, XtNvisual, ws_info->visual, XtNcolormap, ws_info->colormap, XtNborderWidth, 0, XtNbackgroundPixmap, None, XtNwidth, window->width, XtNheight, window->height, NULL); XtRealizeWidget(top_widget); XReparentWindow(x_display, XtWindow(top_widget), (Window)window->window, 0, 0); XtRealizeWidget(form); XSelectInput(x_display, XtWindow(top_widget), 0x0fffff); XtAddEventHandler(top_widget, (SubstructureNotifyMask|KeyPress|KeyRelease), True, xt_client_event_handler, toolkit); XtAddEventHandler(form, (ButtonReleaseMask), True, xt_client_event_handler, toolkit); xt_client_set_info(form, 0); plugin->toolkit_data = toolkit; toolkit->top_widget = top_widget; toolkit->form = form; toolkit->browser_window = (Window)window->window; window->window = (void *)XtWindow(form); return 0; }
Bypass
0
static int create_window(PluginInstance *plugin, NPWindow *window) { if (plugin->is_windowless) { destroy_window_attributes(plugin->window.ws_info); plugin->window.ws_info = NULL; } assert(plugin->window.ws_info == NULL); NPSetWindowCallbackStruct *ws_info; if ((ws_info = NPW_MemClone(NPSetWindowCallbackStruct, window->ws_info)) == NULL) return -1; if (create_window_attributes(ws_info) < 0) return -1; memcpy(&plugin->window, window, sizeof(*window)); window = &plugin->window; window->ws_info = ws_info; fixup_size_hints(plugin); if (plugin->is_windowless) return 0; if (plugin->use_xembed) { GtkData *toolkit = calloc(1, sizeof(*toolkit)); if (toolkit == NULL) return -1; toolkit->container = gtk_plug_new((GdkNativeWindow)window->window); if (toolkit->container == NULL) return -1; gtk_widget_set_size_request(toolkit->container, window->width, window->height); gtk_widget_show(toolkit->container); toolkit->socket = gtk_socket_new(); if (toolkit->socket == NULL) return -1; gtk_widget_show(toolkit->socket); gtk_container_add(GTK_CONTAINER(toolkit->container), toolkit->socket); gtk_widget_show_all(toolkit->container); window->window = (void *)gtk_socket_get_id(GTK_SOCKET(toolkit->socket)); plugin->toolkit_data = toolkit; #if USE_XEMBED_HACK g_signal_connect(toolkit->container, "delete-event", G_CALLBACK(gtk_true), NULL); #endif g_signal_connect(toolkit->container, "destroy", G_CALLBACK(gtk_widget_destroyed), &toolkit->container); g_signal_connect(toolkit->socket, "plug_removed", G_CALLBACK(gtk_true), NULL); return 0; } XtData *toolkit = calloc(1, sizeof(*toolkit)); if (toolkit == NULL) return -1; String app_name, app_class; XtGetApplicationNameAndClass(x_display, &app_name, &app_class); Widget top_widget = XtVaAppCreateShell("drawingArea", app_class, topLevelShellWidgetClass, x_display, XtNoverrideRedirect, True, XtNborderWidth, 0, XtNbackgroundPixmap, None, XtNwidth, window->width, XtNheight, window->height, NULL); Widget form = XtVaCreateManagedWidget("form", compositeWidgetClass, top_widget, XtNdepth, ws_info->depth, XtNvisual, ws_info->visual, XtNcolormap, ws_info->colormap, XtNborderWidth, 0, XtNbackgroundPixmap, None, XtNwidth, window->width, XtNheight, window->height, NULL); XtRealizeWidget(top_widget); XReparentWindow(x_display, XtWindow(top_widget), (Window)window->window, 0, 0); XtRealizeWidget(form); XSelectInput(x_display, XtWindow(top_widget), 0x0fffff); XtAddEventHandler(top_widget, (SubstructureNotifyMask|KeyPress|KeyRelease), True, xt_client_event_handler, toolkit); XtAddEventHandler(form, (ButtonReleaseMask), True, xt_client_event_handler, toolkit); xt_client_set_info(form, 0); plugin->toolkit_data = toolkit; toolkit->top_widget = top_widget; toolkit->form = form; toolkit->browser_window = (Window)window->window; window->window = (void *)XtWindow(form); return 0; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,604
static int create_window_attributes(NPSetWindowCallbackStruct *ws_info) { if (ws_info == NULL) return -1; GdkVisual *gdk_visual; if (ws_info->visual) gdk_visual = gdkx_visual_get((uintptr_t)ws_info->visual); else gdk_visual = gdk_visual_get_system(); if (gdk_visual == NULL) { npw_printf("ERROR: could not reconstruct XVisual from visualID\n"); return -2; } ws_info->display = x_display; ws_info->visual = gdk_x11_visual_get_xvisual(gdk_visual); return 0; }
Bypass
0
static int create_window_attributes(NPSetWindowCallbackStruct *ws_info) { if (ws_info == NULL) return -1; GdkVisual *gdk_visual; if (ws_info->visual) gdk_visual = gdkx_visual_get((uintptr_t)ws_info->visual); else gdk_visual = gdk_visual_get_system(); if (gdk_visual == NULL) { npw_printf("ERROR: could not reconstruct XVisual from visualID\n"); return -2; } ws_info->display = x_display; ws_info->visual = gdk_x11_visual_get_xvisual(gdk_visual); return 0; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,605
static void delayed_calls_add(int type, gpointer data) { DelayedCall *dcall = NPW_MemNew(DelayedCall, 1); if (dcall == NULL) return; dcall->type = type; dcall->data = data; g_delayed_calls = g_list_append(g_delayed_calls, dcall); if (g_delayed_calls_id == 0) g_delayed_calls_id = g_idle_add_full(G_PRIORITY_LOW, delayed_calls_process_cb, NULL, NULL); }
Bypass
0
static void delayed_calls_add(int type, gpointer data) { DelayedCall *dcall = NPW_MemNew(DelayedCall, 1); if (dcall == NULL) return; dcall->type = type; dcall->data = data; g_delayed_calls = g_list_append(g_delayed_calls, dcall); if (g_delayed_calls_id == 0) g_delayed_calls_id = g_idle_add_full(G_PRIORITY_LOW, delayed_calls_process_cb, NULL, NULL); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,606
static gboolean delayed_calls_process_cb(gpointer user_data) { return delayed_calls_process(NULL, FALSE); }
Bypass
0
static gboolean delayed_calls_process_cb(gpointer user_data) { return delayed_calls_process(NULL, FALSE); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,607
static gboolean delayed_destroys_process_cb(gpointer user_data) { while (g_delayed_destroys != NULL) { PluginInstance *plugin = (PluginInstance *)g_delayed_destroys->data; g_delayed_destroys = g_list_delete_link(g_delayed_destroys, g_delayed_destroys); g_NPP_Destroy_Now(plugin, NULL); } if (g_delayed_destroys) return TRUE; if (g_delayed_destroys_id) { g_source_remove(g_delayed_destroys_id); g_delayed_destroys_id = 0; } return FALSE; }
Bypass
0
static gboolean delayed_destroys_process_cb(gpointer user_data) { while (g_delayed_destroys != NULL) { PluginInstance *plugin = (PluginInstance *)g_delayed_destroys->data; g_delayed_destroys = g_list_delete_link(g_delayed_destroys, g_delayed_destroys); g_NPP_Destroy_Now(plugin, NULL); } if (g_delayed_destroys) return TRUE; if (g_delayed_destroys_id) { g_source_remove(g_delayed_destroys_id); g_delayed_destroys_id = 0; } return FALSE; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,608
static void destroy_window_attributes(NPSetWindowCallbackStruct *ws_info) { if (ws_info == NULL) return; NPW_MemFree(ws_info); }
Bypass
0
static void destroy_window_attributes(NPSetWindowCallbackStruct *ws_info) { if (ws_info == NULL) return; NPW_MemFree(ws_info); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,609
static int do_help(const char *prog) { printf("%s, NPAPI plugin viewer. Version %s\n", NPW_VIEWER, NPW_VERSION); printf("\n"); printf("usage: %s [GTK flags] [flags]\n", prog); printf(" -h --help print this message\n"); printf(" -t --test check plugin is compatible\n"); printf(" -i --info print plugin information\n"); printf(" -p --plugin set plugin path\n"); printf(" -c --connection set connection path\n"); return 0; }
Bypass
0
static int do_help(const char *prog) { printf("%s, NPAPI plugin viewer. Version %s\n", NPW_VIEWER, NPW_VERSION); printf("\n"); printf("usage: %s [GTK flags] [flags]\n", prog); printf(" -h --help print this message\n"); printf(" -t --test check plugin is compatible\n"); printf(" -i --info print plugin information\n"); printf(" -p --plugin set plugin path\n"); printf(" -c --connection set connection path\n"); return 0; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,610
static int do_info(void) { if (do_test() != 0) return 1; const char *plugin_name = NULL; if (g_NP_GetValue(NPPVpluginNameString, &plugin_name) == NPERR_NO_ERROR && plugin_name) printf("PLUGIN_NAME %zd\n%s\n", strlen(plugin_name), plugin_name); const char *plugin_desc = NULL; if (g_NP_GetValue(NPPVpluginDescriptionString, &plugin_desc) == NPERR_NO_ERROR && plugin_desc) printf("PLUGIN_DESC %zd\n%s\n", strlen(plugin_desc), plugin_desc); const char *mime_info = g_NP_GetMIMEDescription(); if (mime_info) printf("PLUGIN_MIME %zd\n%s\n", strlen(mime_info), mime_info); return 0; }
Bypass
0
static int do_info(void) { if (do_test() != 0) return 1; const char *plugin_name = NULL; if (g_NP_GetValue(NPPVpluginNameString, &plugin_name) == NPERR_NO_ERROR && plugin_name) printf("PLUGIN_NAME %zd\n%s\n", strlen(plugin_name), plugin_name); const char *plugin_desc = NULL; if (g_NP_GetValue(NPPVpluginDescriptionString, &plugin_desc) == NPERR_NO_ERROR && plugin_desc) printf("PLUGIN_DESC %zd\n%s\n", strlen(plugin_desc), plugin_desc); const char *mime_info = g_NP_GetMIMEDescription(); if (mime_info) printf("PLUGIN_MIME %zd\n%s\n", strlen(mime_info), mime_info); return 0; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,611
static int do_main(int argc, char **argv, const char *connection_path) { if (do_test() != 0) return 1; if (connection_path == NULL) { npw_printf("ERROR: missing connection path argument\n"); return 1; } D(bug(" Plugin connection: %s\n", connection_path)); D(bug(" Plugin viewer pid: %d\n", getpid())); thread_check_init(); D(bug(" Plugin main thread: %p\n", g_main_thread)); #if defined(__linux__) if (getenv("LD_PRELOAD")) unsetenv("LD_PRELOAD"); #endif XtToolkitInitialize(); x_app_context = XtCreateApplicationContext(); x_display = XtOpenDisplay(x_app_context, NULL, "npw-viewer", "npw-viewer", NULL, 0, &argc, argv); g_thread_init(NULL); gtk_init(&argc, &argv); if ((g_rpc_connection = rpc_init_server(connection_path)) == NULL) { npw_printf("ERROR: failed to initialize plugin-side RPC server connection\n"); return 1; } if (rpc_add_np_marshalers(g_rpc_connection) < 0) { npw_printf("ERROR: failed to initialize plugin-side marshalers\n"); return 1; } static const rpc_method_descriptor_t vtable[] = { { RPC_METHOD_NP_GET_MIME_DESCRIPTION, handle_NP_GetMIMEDescription }, { RPC_METHOD_NP_GET_VALUE, handle_NP_GetValue }, { RPC_METHOD_NP_INITIALIZE, handle_NP_Initialize }, { RPC_METHOD_NP_SHUTDOWN, handle_NP_Shutdown }, { RPC_METHOD_NPP_NEW, handle_NPP_New }, { RPC_METHOD_NPP_DESTROY, handle_NPP_Destroy }, { RPC_METHOD_NPP_GET_VALUE, handle_NPP_GetValue }, { RPC_METHOD_NPP_SET_WINDOW, handle_NPP_SetWindow }, { RPC_METHOD_NPP_URL_NOTIFY, handle_NPP_URLNotify }, { RPC_METHOD_NPP_NEW_STREAM, handle_NPP_NewStream }, { RPC_METHOD_NPP_DESTROY_STREAM, handle_NPP_DestroyStream }, { RPC_METHOD_NPP_WRITE_READY, handle_NPP_WriteReady }, { RPC_METHOD_NPP_WRITE, handle_NPP_Write }, { RPC_METHOD_NPP_STREAM_AS_FILE, handle_NPP_StreamAsFile }, { RPC_METHOD_NPP_PRINT, handle_NPP_Print }, { RPC_METHOD_NPP_HANDLE_EVENT, handle_NPP_HandleEvent }, { RPC_METHOD_NPCLASS_INVALIDATE, npclass_handle_Invalidate }, { RPC_METHOD_NPCLASS_HAS_METHOD, npclass_handle_HasMethod }, { RPC_METHOD_NPCLASS_INVOKE, npclass_handle_Invoke }, { RPC_METHOD_NPCLASS_INVOKE_DEFAULT, npclass_handle_InvokeDefault }, { RPC_METHOD_NPCLASS_HAS_PROPERTY, npclass_handle_HasProperty }, { RPC_METHOD_NPCLASS_GET_PROPERTY, npclass_handle_GetProperty }, { RPC_METHOD_NPCLASS_SET_PROPERTY, npclass_handle_SetProperty }, { RPC_METHOD_NPCLASS_REMOVE_PROPERTY, npclass_handle_RemoveProperty }, }; if (rpc_connection_add_method_descriptors(g_rpc_connection, vtable, sizeof(vtable) / sizeof(vtable[0])) < 0) { npw_printf("ERROR: failed to setup NPP method callbacks\n"); return 1; } id_init(); GSource *rpc_source = g_source_new(&rpc_event_funcs, sizeof(GSource)); if (rpc_source == NULL) { npw_printf("ERROR: failed to initialize plugin-side RPC events listener\n"); return 1; } g_source_set_priority(rpc_source, G_PRIORITY_LOW); g_source_attach(rpc_source, NULL); rpc_event_poll_fd.fd = rpc_listen_socket(g_rpc_connection); rpc_event_poll_fd.events = G_IO_IN; rpc_event_poll_fd.revents = 0; g_source_set_callback(rpc_source, (GSourceFunc)rpc_dispatch, g_rpc_connection, NULL); g_source_add_poll(rpc_source, &rpc_event_poll_fd); rpc_connection_set_error_callback(g_rpc_connection, rpc_error_callback_cb, NULL); gtk_main(); D(bug("--- EXIT ---\n")); #if USE_NPIDENTIFIER_CACHE npidentifier_cache_destroy(); #endif g_source_destroy(rpc_source); if (xt_source) g_source_destroy(xt_source); if (g_user_agent) free(g_user_agent); if (g_rpc_connection) rpc_connection_unref(g_rpc_connection); id_kill(); return 0; }
Bypass
0
static int do_main(int argc, char **argv, const char *connection_path) { if (do_test() != 0) return 1; if (connection_path == NULL) { npw_printf("ERROR: missing connection path argument\n"); return 1; } D(bug(" Plugin connection: %s\n", connection_path)); D(bug(" Plugin viewer pid: %d\n", getpid())); thread_check_init(); D(bug(" Plugin main thread: %p\n", g_main_thread)); #if defined(__linux__) if (getenv("LD_PRELOAD")) unsetenv("LD_PRELOAD"); #endif XtToolkitInitialize(); x_app_context = XtCreateApplicationContext(); x_display = XtOpenDisplay(x_app_context, NULL, "npw-viewer", "npw-viewer", NULL, 0, &argc, argv); g_thread_init(NULL); gtk_init(&argc, &argv); if ((g_rpc_connection = rpc_init_server(connection_path)) == NULL) { npw_printf("ERROR: failed to initialize plugin-side RPC server connection\n"); return 1; } if (rpc_add_np_marshalers(g_rpc_connection) < 0) { npw_printf("ERROR: failed to initialize plugin-side marshalers\n"); return 1; } static const rpc_method_descriptor_t vtable[] = { { RPC_METHOD_NP_GET_MIME_DESCRIPTION, handle_NP_GetMIMEDescription }, { RPC_METHOD_NP_GET_VALUE, handle_NP_GetValue }, { RPC_METHOD_NP_INITIALIZE, handle_NP_Initialize }, { RPC_METHOD_NP_SHUTDOWN, handle_NP_Shutdown }, { RPC_METHOD_NPP_NEW, handle_NPP_New }, { RPC_METHOD_NPP_DESTROY, handle_NPP_Destroy }, { RPC_METHOD_NPP_GET_VALUE, handle_NPP_GetValue }, { RPC_METHOD_NPP_SET_WINDOW, handle_NPP_SetWindow }, { RPC_METHOD_NPP_URL_NOTIFY, handle_NPP_URLNotify }, { RPC_METHOD_NPP_NEW_STREAM, handle_NPP_NewStream }, { RPC_METHOD_NPP_DESTROY_STREAM, handle_NPP_DestroyStream }, { RPC_METHOD_NPP_WRITE_READY, handle_NPP_WriteReady }, { RPC_METHOD_NPP_WRITE, handle_NPP_Write }, { RPC_METHOD_NPP_STREAM_AS_FILE, handle_NPP_StreamAsFile }, { RPC_METHOD_NPP_PRINT, handle_NPP_Print }, { RPC_METHOD_NPP_HANDLE_EVENT, handle_NPP_HandleEvent }, { RPC_METHOD_NPCLASS_INVALIDATE, npclass_handle_Invalidate }, { RPC_METHOD_NPCLASS_HAS_METHOD, npclass_handle_HasMethod }, { RPC_METHOD_NPCLASS_INVOKE, npclass_handle_Invoke }, { RPC_METHOD_NPCLASS_INVOKE_DEFAULT, npclass_handle_InvokeDefault }, { RPC_METHOD_NPCLASS_HAS_PROPERTY, npclass_handle_HasProperty }, { RPC_METHOD_NPCLASS_GET_PROPERTY, npclass_handle_GetProperty }, { RPC_METHOD_NPCLASS_SET_PROPERTY, npclass_handle_SetProperty }, { RPC_METHOD_NPCLASS_REMOVE_PROPERTY, npclass_handle_RemoveProperty }, }; if (rpc_connection_add_method_descriptors(g_rpc_connection, vtable, sizeof(vtable) / sizeof(vtable[0])) < 0) { npw_printf("ERROR: failed to setup NPP method callbacks\n"); return 1; } id_init(); GSource *rpc_source = g_source_new(&rpc_event_funcs, sizeof(GSource)); if (rpc_source == NULL) { npw_printf("ERROR: failed to initialize plugin-side RPC events listener\n"); return 1; } g_source_set_priority(rpc_source, G_PRIORITY_LOW); g_source_attach(rpc_source, NULL); rpc_event_poll_fd.fd = rpc_listen_socket(g_rpc_connection); rpc_event_poll_fd.events = G_IO_IN; rpc_event_poll_fd.revents = 0; g_source_set_callback(rpc_source, (GSourceFunc)rpc_dispatch, g_rpc_connection, NULL); g_source_add_poll(rpc_source, &rpc_event_poll_fd); rpc_connection_set_error_callback(g_rpc_connection, rpc_error_callback_cb, NULL); gtk_main(); D(bug("--- EXIT ---\n")); #if USE_NPIDENTIFIER_CACHE npidentifier_cache_destroy(); #endif g_source_destroy(rpc_source); if (xt_source) g_source_destroy(xt_source); if (g_user_agent) free(g_user_agent); if (g_rpc_connection) rpc_connection_unref(g_rpc_connection); id_kill(); return 0; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,612
static int error_handler(Display *display, XErrorEvent *error) { trapped_error_code = error->error_code; return 0; }
Bypass
0
static int error_handler(Display *display, XErrorEvent *error) { trapped_error_code = error->error_code; return 0; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,613
static void fixup_size_hints(PluginInstance *plugin) { NPWindow *window = &plugin->window; if (window->width == 0 || window->height == 0) { if (plugin->width && plugin->height) { window->width = plugin->width; window->height = plugin->height; return; } } if (window->window && (window->width == 0 || window->height == 0)) { XWindowAttributes win_attr; if (XGetWindowAttributes(x_display, (Window)window->window, &win_attr)) { plugin->width = window->width = win_attr.width; plugin->height = window->height = win_attr.height; return; } } if (window->width == 0 || window->height == 0) npw_printf("WARNING: grmpf, despite much effort, I could not determine the actual plugin area size...\n"); }
Bypass
0
static void fixup_size_hints(PluginInstance *plugin) { NPWindow *window = &plugin->window; if (window->width == 0 || window->height == 0) { if (plugin->width && plugin->height) { window->width = plugin->width; window->height = plugin->height; return; } } if (window->window && (window->width == 0 || window->height == 0)) { XWindowAttributes win_attr; if (XGetWindowAttributes(x_display, (Window)window->window, &win_attr)) { plugin->width = window->width = win_attr.width; plugin->height = window->height = win_attr.height; return; } } if (window->width == 0 || window->height == 0) npw_printf("WARNING: grmpf, despite much effort, I could not determine the actual plugin area size...\n"); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,614
g_NPN_CreateObject(NPP instance, NPClass *class) { if (!thread_check()) { npw_printf("WARNING: NPN_CreateObject not called from the main thread\n"); return NULL; } if (instance == NULL) return NULL; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return NULL; if (class == NULL) return NULL; D(bugiI("NPN_CreateObject\n")); npw_plugin_instance_ref(plugin); uint32_t npobj_id = invoke_NPN_CreateObject(plugin); npw_plugin_instance_unref(plugin); assert(npobj_id != 0); NPObject *npobj = npobject_new(npobj_id, instance, class); D(bugiD("NPN_CreateObject return: %p (refcount: %d)\n", npobj, npobj->referenceCount)); return npobj; }
Bypass
0
g_NPN_CreateObject(NPP instance, NPClass *class) { if (!thread_check()) { npw_printf("WARNING: NPN_CreateObject not called from the main thread\n"); return NULL; } if (instance == NULL) return NULL; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return NULL; if (class == NULL) return NULL; D(bugiI("NPN_CreateObject\n")); npw_plugin_instance_ref(plugin); uint32_t npobj_id = invoke_NPN_CreateObject(plugin); npw_plugin_instance_unref(plugin); assert(npobj_id != 0); NPObject *npobj = npobject_new(npobj_id, instance, class); D(bugiD("NPN_CreateObject return: %p (refcount: %d)\n", npobj, npobj->referenceCount)); return npobj; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,615
g_NPN_DestroyStream(NPP instance, NPStream *stream, NPError reason) { if (!thread_check()) { npw_printf("WARNING: NPN_DestroyStream not called from the main thread\n"); return NPERR_INVALID_INSTANCE_ERROR; } if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return NPERR_INVALID_INSTANCE_ERROR; if (stream == NULL) return NPERR_INVALID_PARAM; D(bugiI("NPN_DestroyStream instance=%p, stream=%p, reason=%s\n", instance, stream, string_of_NPReason(reason))); npw_plugin_instance_ref(plugin); NPError ret = invoke_NPN_DestroyStream(plugin, stream, reason); npw_plugin_instance_unref(plugin); D(bugiD("NPN_DestroyStream return: %d [%s]\n", ret, string_of_NPError(ret))); StreamInstance *stream_ndata = stream->ndata; if (stream_ndata && stream_ndata->is_plugin_stream) { id_remove(stream_ndata->stream_id); free(stream_ndata); free((char *)stream->url); free((char *)stream->headers); free(stream); } return ret; }
Bypass
0
g_NPN_DestroyStream(NPP instance, NPStream *stream, NPError reason) { if (!thread_check()) { npw_printf("WARNING: NPN_DestroyStream not called from the main thread\n"); return NPERR_INVALID_INSTANCE_ERROR; } if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return NPERR_INVALID_INSTANCE_ERROR; if (stream == NULL) return NPERR_INVALID_PARAM; D(bugiI("NPN_DestroyStream instance=%p, stream=%p, reason=%s\n", instance, stream, string_of_NPReason(reason))); npw_plugin_instance_ref(plugin); NPError ret = invoke_NPN_DestroyStream(plugin, stream, reason); npw_plugin_instance_unref(plugin); D(bugiD("NPN_DestroyStream return: %d [%s]\n", ret, string_of_NPError(ret))); StreamInstance *stream_ndata = stream->ndata; if (stream_ndata && stream_ndata->is_plugin_stream) { id_remove(stream_ndata->stream_id); free(stream_ndata); free((char *)stream->url); free((char *)stream->headers); free(stream); } return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,616
g_NPN_Evaluate(NPP instance, NPObject *npobj, NPString *script, NPVariant *result) { if (!thread_check()) { npw_printf("WARNING: NPN_Evaluate not called from the main thread\n"); return false; } if (instance == NULL) return false; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return false; if (!npobj) return false; if (!script || !script->UTF8Length || !script->UTF8Characters) return true; // nothing to evaluate D(bugiI("NPN_Evaluate instance=%p, npobj=%p\n", instance, npobj)); npw_plugin_instance_ref(plugin); bool ret = invoke_NPN_Evaluate(plugin, npobj, script, result); npw_plugin_instance_unref(plugin); gchar *result_str = string_of_NPVariant(result); D(bugiD("NPN_Evaluate return: %d (%s)\n", ret, result_str)); g_free(result_str); return ret; }
Bypass
0
g_NPN_Evaluate(NPP instance, NPObject *npobj, NPString *script, NPVariant *result) { if (!thread_check()) { npw_printf("WARNING: NPN_Evaluate not called from the main thread\n"); return false; } if (instance == NULL) return false; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return false; if (!npobj) return false; if (!script || !script->UTF8Length || !script->UTF8Characters) return true; // nothing to evaluate D(bugiI("NPN_Evaluate instance=%p, npobj=%p\n", instance, npobj)); npw_plugin_instance_ref(plugin); bool ret = invoke_NPN_Evaluate(plugin, npobj, script, result); npw_plugin_instance_unref(plugin); gchar *result_str = string_of_NPVariant(result); D(bugiD("NPN_Evaluate return: %d (%s)\n", ret, result_str)); g_free(result_str); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,617
g_NPN_ForceRedraw(NPP instance) { D(bug("NPN_ForceRedraw instance=%p\n", instance)); NPW_UNIMPLEMENTED(); }
Bypass
0
g_NPN_ForceRedraw(NPP instance) { D(bug("NPN_ForceRedraw instance=%p\n", instance)); NPW_UNIMPLEMENTED(); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,618
g_NPN_GetIntIdentifier(int32_t intid) { if (!thread_check()) { npw_printf("WARNING: NPN_GetIntIdentifier not called from the main thread\n"); return NULL; } D(bugiI("NPN_GetIntIdentifier intid=%d\n", intid)); NPIdentifier ret = cached_NPN_GetIntIdentifier(intid); D(bugiD("NPN_GetIntIdentifier return: %p\n", ret)); return ret; }
Bypass
0
g_NPN_GetIntIdentifier(int32_t intid) { if (!thread_check()) { npw_printf("WARNING: NPN_GetIntIdentifier not called from the main thread\n"); return NULL; } D(bugiI("NPN_GetIntIdentifier intid=%d\n", intid)); NPIdentifier ret = cached_NPN_GetIntIdentifier(intid); D(bugiD("NPN_GetIntIdentifier return: %p\n", ret)); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,619
g_NPN_GetJavaEnv(void) { D(bug("NPN_GetJavaEnv\n")); return NULL; }
Bypass
0
g_NPN_GetJavaEnv(void) { D(bug("NPN_GetJavaEnv\n")); return NULL; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,620
g_NPN_GetJavaPeer(NPP instance) { D(bug("NPN_GetJavaPeer instance=%p\n", instance)); return NULL; }
Bypass
0
g_NPN_GetJavaPeer(NPP instance) { D(bug("NPN_GetJavaPeer instance=%p\n", instance)); return NULL; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,621
g_NPN_GetProperty(NPP instance, NPObject *npobj, NPIdentifier propertyName, NPVariant *result) { if (!thread_check()) { npw_printf("WARNING: NPN_GetProperty not called from the main thread\n"); return false; } if (instance == NULL) return false; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return false; if (!npobj || !npobj->_class || !npobj->_class->getProperty) return false; D(bugiI("NPN_GetProperty instance=%p, npobj=%p, propertyName=%p\n", instance, npobj, propertyName)); npw_plugin_instance_ref(plugin); bool ret = invoke_NPN_GetProperty(plugin, npobj, propertyName, result); npw_plugin_instance_unref(plugin); gchar *result_str = string_of_NPVariant(result); D(bugiD("NPN_GetProperty return: %d (%s)\n", ret, result_str)); g_free(result_str); return ret; }
Bypass
0
g_NPN_GetProperty(NPP instance, NPObject *npobj, NPIdentifier propertyName, NPVariant *result) { if (!thread_check()) { npw_printf("WARNING: NPN_GetProperty not called from the main thread\n"); return false; } if (instance == NULL) return false; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return false; if (!npobj || !npobj->_class || !npobj->_class->getProperty) return false; D(bugiI("NPN_GetProperty instance=%p, npobj=%p, propertyName=%p\n", instance, npobj, propertyName)); npw_plugin_instance_ref(plugin); bool ret = invoke_NPN_GetProperty(plugin, npobj, propertyName, result); npw_plugin_instance_unref(plugin); gchar *result_str = string_of_NPVariant(result); D(bugiD("NPN_GetProperty return: %d (%s)\n", ret, result_str)); g_free(result_str); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,622
g_NPN_GetURL(NPP instance, const char *url, const char *target) { if (!thread_check()) { npw_printf("WARNING: NPN_GetURL not called from the main thread\n"); return NPERR_INVALID_INSTANCE_ERROR; } if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return NPERR_INVALID_INSTANCE_ERROR; D(bugiI("NPN_GetURL instance=%p\n", instance)); npw_plugin_instance_ref(plugin); NPError ret = invoke_NPN_GetURL(plugin, url, target); npw_plugin_instance_unref(plugin); D(bugiD("NPN_GetURL return: %d [%s]\n", ret, string_of_NPError(ret))); return ret; }
Bypass
0
g_NPN_GetURL(NPP instance, const char *url, const char *target) { if (!thread_check()) { npw_printf("WARNING: NPN_GetURL not called from the main thread\n"); return NPERR_INVALID_INSTANCE_ERROR; } if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return NPERR_INVALID_INSTANCE_ERROR; D(bugiI("NPN_GetURL instance=%p\n", instance)); npw_plugin_instance_ref(plugin); NPError ret = invoke_NPN_GetURL(plugin, url, target); npw_plugin_instance_unref(plugin); D(bugiD("NPN_GetURL return: %d [%s]\n", ret, string_of_NPError(ret))); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,623
g_NPN_GetURLNotify(NPP instance, const char *url, const char *target, void *notifyData) { if (!thread_check()) { npw_printf("WARNING: NPN_GetURLNotify not called from the main thread\n"); return NPERR_INVALID_INSTANCE_ERROR; } if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return NPERR_INVALID_INSTANCE_ERROR; D(bugiI("NPN_GetURLNotify instance=%p\n", instance)); npw_plugin_instance_ref(plugin); NPError ret = invoke_NPN_GetURLNotify(plugin, url, target, notifyData); npw_plugin_instance_unref(plugin); D(bugiD("NPN_GetURLNotify return: %d [%s]\n", ret, string_of_NPError(ret))); return ret; }
Bypass
0
g_NPN_GetURLNotify(NPP instance, const char *url, const char *target, void *notifyData) { if (!thread_check()) { npw_printf("WARNING: NPN_GetURLNotify not called from the main thread\n"); return NPERR_INVALID_INSTANCE_ERROR; } if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return NPERR_INVALID_INSTANCE_ERROR; D(bugiI("NPN_GetURLNotify instance=%p\n", instance)); npw_plugin_instance_ref(plugin); NPError ret = invoke_NPN_GetURLNotify(plugin, url, target, notifyData); npw_plugin_instance_unref(plugin); D(bugiD("NPN_GetURLNotify return: %d [%s]\n", ret, string_of_NPError(ret))); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,624
g_NPN_GetValue_real(NPP instance, NPNVariable variable, void *value) { PluginInstance *plugin = NULL; if (instance) plugin = PLUGIN_INSTANCE(instance); npw_plugin_instance_ref(plugin); NPError ret = invoke_NPN_GetValue(plugin, variable, value); npw_plugin_instance_unref(plugin); return ret; }
Bypass
0
g_NPN_GetValue_real(NPP instance, NPNVariable variable, void *value) { PluginInstance *plugin = NULL; if (instance) plugin = PLUGIN_INSTANCE(instance); npw_plugin_instance_ref(plugin); NPError ret = invoke_NPN_GetValue(plugin, variable, value); npw_plugin_instance_unref(plugin); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,625
g_NPN_HasProperty(NPP instance, NPObject *npobj, NPIdentifier propertyName) { if (!thread_check()) { npw_printf("WARNING: NPN_HasProperty not called from the main thread\n"); return false; } if (instance == NULL) return false; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return false; if (!npobj || !npobj->_class || !npobj->_class->hasProperty) return false; D(bugiI("NPN_HasProperty instance=%p, npobj=%p, propertyName=%p\n", instance, npobj, propertyName)); npw_plugin_instance_ref(plugin); bool ret = invoke_NPN_HasProperty(plugin, npobj, propertyName); npw_plugin_instance_unref(plugin); D(bugiD("NPN_HasProperty return: %d\n", ret)); return ret; }
Bypass
0
g_NPN_HasProperty(NPP instance, NPObject *npobj, NPIdentifier propertyName) { if (!thread_check()) { npw_printf("WARNING: NPN_HasProperty not called from the main thread\n"); return false; } if (instance == NULL) return false; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return false; if (!npobj || !npobj->_class || !npobj->_class->hasProperty) return false; D(bugiI("NPN_HasProperty instance=%p, npobj=%p, propertyName=%p\n", instance, npobj, propertyName)); npw_plugin_instance_ref(plugin); bool ret = invoke_NPN_HasProperty(plugin, npobj, propertyName); npw_plugin_instance_unref(plugin); D(bugiD("NPN_HasProperty return: %d\n", ret)); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,626
g_NPN_IntFromIdentifier(NPIdentifier identifier) { if (!thread_check()) { npw_printf("WARNING: NPN_IntFromIdentifier not called from the main thread\n"); return 0; } D(bugiI("NPN_IntFromIdentifier identifier=%p\n", identifier)); int32_t ret = cached_NPN_IntFromIdentifier(identifier); D(bugiD("NPN_IntFromIdentifier return: %d\n", ret)); return ret; }
Bypass
0
g_NPN_IntFromIdentifier(NPIdentifier identifier) { if (!thread_check()) { npw_printf("WARNING: NPN_IntFromIdentifier not called from the main thread\n"); return 0; } D(bugiI("NPN_IntFromIdentifier identifier=%p\n", identifier)); int32_t ret = cached_NPN_IntFromIdentifier(identifier); D(bugiD("NPN_IntFromIdentifier return: %d\n", ret)); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,627
g_NPN_InvalidateRect(NPP instance, NPRect *invalidRect) { if (!thread_check()) { npw_printf("WARNING: NPN_InvalidateRect not called from the main thread\n"); return; } if (instance == NULL) return; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return; if (invalidRect == NULL) return; D(bugiI("NPN_InvalidateRect instance=%p\n", PLUGIN_INSTANCE_NPP(plugin))); npw_plugin_instance_ref(plugin); invoke_NPN_InvalidateRect(plugin, invalidRect); npw_plugin_instance_unref(plugin); D(bugiD("NPN_InvalidateRect done\n")); }
Bypass
0
g_NPN_InvalidateRect(NPP instance, NPRect *invalidRect) { if (!thread_check()) { npw_printf("WARNING: NPN_InvalidateRect not called from the main thread\n"); return; } if (instance == NULL) return; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return; if (invalidRect == NULL) return; D(bugiI("NPN_InvalidateRect instance=%p\n", PLUGIN_INSTANCE_NPP(plugin))); npw_plugin_instance_ref(plugin); invoke_NPN_InvalidateRect(plugin, invalidRect); npw_plugin_instance_unref(plugin); D(bugiD("NPN_InvalidateRect done\n")); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,628
g_NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion) { D(bug("NPN_InvalidateRegion instance=%p\n", instance)); NPW_UNIMPLEMENTED(); }
Bypass
0
g_NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion) { D(bug("NPN_InvalidateRegion instance=%p\n", instance)); NPW_UNIMPLEMENTED(); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,629
g_NPN_Invoke(NPP instance, NPObject *npobj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result) { if (!thread_check()) { npw_printf("WARNING: NPN_Invoke not called from the main thread\n"); return false; } if (instance == NULL) return false; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return false; if (!npobj || !npobj->_class || !npobj->_class->invoke) return false; D(bugiI("NPN_Invoke instance=%p, npobj=%p, methodName=%p\n", instance, npobj, methodName)); print_npvariant_args(args, argCount); npw_plugin_instance_ref(plugin); bool ret = invoke_NPN_Invoke(plugin, npobj, methodName, args, argCount, result); npw_plugin_instance_unref(plugin); gchar *result_str = string_of_NPVariant(result); D(bugiD("NPN_Invoke return: %d (%s)\n", ret, result_str)); g_free(result_str); return ret; }
Bypass
0
g_NPN_Invoke(NPP instance, NPObject *npobj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result) { if (!thread_check()) { npw_printf("WARNING: NPN_Invoke not called from the main thread\n"); return false; } if (instance == NULL) return false; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return false; if (!npobj || !npobj->_class || !npobj->_class->invoke) return false; D(bugiI("NPN_Invoke instance=%p, npobj=%p, methodName=%p\n", instance, npobj, methodName)); print_npvariant_args(args, argCount); npw_plugin_instance_ref(plugin); bool ret = invoke_NPN_Invoke(plugin, npobj, methodName, args, argCount, result); npw_plugin_instance_unref(plugin); gchar *result_str = string_of_NPVariant(result); D(bugiD("NPN_Invoke return: %d (%s)\n", ret, result_str)); g_free(result_str); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,630
g_NPN_InvokeDefault(NPP instance, NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result) { if (!thread_check()) { npw_printf("WARNING: NPN_InvokeDefault not called from the main thread\n"); return false; } if (instance == NULL) return false; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return false; if (!npobj || !npobj->_class || !npobj->_class->invokeDefault) return false; D(bugiI("NPN_InvokeDefault instance=%p, npobj=%p\n", instance, npobj)); print_npvariant_args(args, argCount); npw_plugin_instance_ref(plugin); bool ret = invoke_NPN_InvokeDefault(plugin, npobj, args, argCount, result); npw_plugin_instance_unref(plugin); gchar *result_str = string_of_NPVariant(result); D(bugiD("NPN_InvokeDefault return: %d (%s)\n", ret, result_str)); g_free(result_str); return ret; }
Bypass
0
g_NPN_InvokeDefault(NPP instance, NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result) { if (!thread_check()) { npw_printf("WARNING: NPN_InvokeDefault not called from the main thread\n"); return false; } if (instance == NULL) return false; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return false; if (!npobj || !npobj->_class || !npobj->_class->invokeDefault) return false; D(bugiI("NPN_InvokeDefault instance=%p, npobj=%p\n", instance, npobj)); print_npvariant_args(args, argCount); npw_plugin_instance_ref(plugin); bool ret = invoke_NPN_InvokeDefault(plugin, npobj, args, argCount, result); npw_plugin_instance_unref(plugin); gchar *result_str = string_of_NPVariant(result); D(bugiD("NPN_InvokeDefault return: %d (%s)\n", ret, result_str)); g_free(result_str); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,631
g_NPN_MemAlloc(uint32_t size) { D(bugiI("NPN_MemAlloc size=%d\n", size)); void *ptr = NPW_MemAlloc(size); D(bugiD("NPN_MemAlloc return: %p\n", ptr)); return ptr; }
Bypass
0
g_NPN_MemAlloc(uint32_t size) { D(bugiI("NPN_MemAlloc size=%d\n", size)); void *ptr = NPW_MemAlloc(size); D(bugiD("NPN_MemAlloc return: %p\n", ptr)); return ptr; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,632
g_NPN_NewStream(NPP instance, NPMIMEType type, const char *target, NPStream **stream) { if (!thread_check()) { npw_printf("WARNING: NPN_NewStream not called from the main thread\n"); return NPERR_INVALID_INSTANCE_ERROR; } if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return NPERR_INVALID_INSTANCE_ERROR; if (stream == NULL) return NPERR_INVALID_PARAM; *stream = NULL; D(bugiI("NPN_NewStream instance=%p\n", instance)); npw_plugin_instance_ref(plugin); NPError ret = invoke_NPN_NewStream(plugin, type, target, stream); npw_plugin_instance_unref(plugin); D(bugiD("NPN_NewStream return: %d [%s]\n", ret, string_of_NPError(ret))); return ret; }
Bypass
0
g_NPN_NewStream(NPP instance, NPMIMEType type, const char *target, NPStream **stream) { if (!thread_check()) { npw_printf("WARNING: NPN_NewStream not called from the main thread\n"); return NPERR_INVALID_INSTANCE_ERROR; } if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return NPERR_INVALID_INSTANCE_ERROR; if (stream == NULL) return NPERR_INVALID_PARAM; *stream = NULL; D(bugiI("NPN_NewStream instance=%p\n", instance)); npw_plugin_instance_ref(plugin); NPError ret = invoke_NPN_NewStream(plugin, type, target, stream); npw_plugin_instance_unref(plugin); D(bugiD("NPN_NewStream return: %d [%s]\n", ret, string_of_NPError(ret))); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,633
g_NPN_PopPopupsEnabledState(NPP instance) { if (!thread_check()) { npw_printf("WARNING: NPN_PophPopupsEnabledState not called from the main thread\n"); return; } if (instance == NULL) return; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return; D(bugiI("NPN_PopPopupsEnabledState instance=%p\n", instance)); npw_plugin_instance_ref(plugin); invoke_NPN_PopPopupsEnabledState(plugin); npw_plugin_instance_unref(plugin); D(bugiD("NPN_PopPopupsEnabledState done\n")); }
Bypass
0
g_NPN_PopPopupsEnabledState(NPP instance) { if (!thread_check()) { npw_printf("WARNING: NPN_PophPopupsEnabledState not called from the main thread\n"); return; } if (instance == NULL) return; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return; D(bugiI("NPN_PopPopupsEnabledState instance=%p\n", instance)); npw_plugin_instance_ref(plugin); invoke_NPN_PopPopupsEnabledState(plugin); npw_plugin_instance_unref(plugin); D(bugiD("NPN_PopPopupsEnabledState done\n")); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,634
g_NPN_PostURL(NPP instance, const char *url, const char *target, uint32_t len, const char *buf, NPBool file) { if (!thread_check()) { npw_printf("WARNING: NPN_PostURL not called from the main thread\n"); return NPERR_INVALID_INSTANCE_ERROR; } if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return NPERR_INVALID_INSTANCE_ERROR; D(bugiI("NPN_PostURL instance=%p\n", instance)); npw_plugin_instance_ref(plugin); NPError ret = invoke_NPN_PostURL(plugin, url, target, len, buf, file); npw_plugin_instance_unref(plugin); D(bugiD("NPN_PostURL return: %d [%s]\n", ret, string_of_NPError(ret))); return ret; }
Bypass
0
g_NPN_PostURL(NPP instance, const char *url, const char *target, uint32_t len, const char *buf, NPBool file) { if (!thread_check()) { npw_printf("WARNING: NPN_PostURL not called from the main thread\n"); return NPERR_INVALID_INSTANCE_ERROR; } if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return NPERR_INVALID_INSTANCE_ERROR; D(bugiI("NPN_PostURL instance=%p\n", instance)); npw_plugin_instance_ref(plugin); NPError ret = invoke_NPN_PostURL(plugin, url, target, len, buf, file); npw_plugin_instance_unref(plugin); D(bugiD("NPN_PostURL return: %d [%s]\n", ret, string_of_NPError(ret))); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,635
g_NPN_PostURLNotify(NPP instance, const char *url, const char *target, uint32_t len, const char *buf, NPBool file, void *notifyData) { if (!thread_check()) { npw_printf("WARNING: NPN_PostURLNotify not called from the main thread\n"); return NPERR_INVALID_INSTANCE_ERROR; } if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return NPERR_INVALID_INSTANCE_ERROR; D(bugiI("NPN_PostURLNotify instance=%p\n", instance)); npw_plugin_instance_ref(plugin); NPError ret = invoke_NPN_PostURLNotify(plugin, url, target, len, buf, file, notifyData); npw_plugin_instance_unref(plugin); D(bugiD("NPN_PostURLNotify return: %d [%s]\n", ret, string_of_NPError(ret))); return ret; }
Bypass
0
g_NPN_PostURLNotify(NPP instance, const char *url, const char *target, uint32_t len, const char *buf, NPBool file, void *notifyData) { if (!thread_check()) { npw_printf("WARNING: NPN_PostURLNotify not called from the main thread\n"); return NPERR_INVALID_INSTANCE_ERROR; } if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return NPERR_INVALID_INSTANCE_ERROR; D(bugiI("NPN_PostURLNotify instance=%p\n", instance)); npw_plugin_instance_ref(plugin); NPError ret = invoke_NPN_PostURLNotify(plugin, url, target, len, buf, file, notifyData); npw_plugin_instance_unref(plugin); D(bugiD("NPN_PostURLNotify return: %d [%s]\n", ret, string_of_NPError(ret))); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,636
g_NPN_ReleaseObject(NPObject *npobj) { if (!thread_check()) { npw_printf("WARNING: NPN_ReleaseObject not called from the main thread\n"); return; } if (npobj == NULL) return; if (rpc_method_invoke_possible(g_rpc_connection)) { D(bug("NPN_ReleaseObject <now>\n")); g_NPN_ReleaseObject_Now(npobj); } else { D(bug("NPN_ReleaseObject <delayed>\n")); g_NPN_ReleaseObject_Delayed(npobj); } }
Bypass
0
g_NPN_ReleaseObject(NPObject *npobj) { if (!thread_check()) { npw_printf("WARNING: NPN_ReleaseObject not called from the main thread\n"); return; } if (npobj == NULL) return; if (rpc_method_invoke_possible(g_rpc_connection)) { D(bug("NPN_ReleaseObject <now>\n")); g_NPN_ReleaseObject_Now(npobj); } else { D(bug("NPN_ReleaseObject <delayed>\n")); g_NPN_ReleaseObject_Delayed(npobj); } }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,637
g_NPN_ReleaseObject_Delayed(NPObject *npobj) { delayed_calls_add(RPC_DELAYED_NPN_RELEASE_OBJECT, npobj); }
Bypass
0
g_NPN_ReleaseObject_Delayed(NPObject *npobj) { delayed_calls_add(RPC_DELAYED_NPN_RELEASE_OBJECT, npobj); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,638
g_NPN_ReleaseObject_Now(NPObject *npobj) { D(bugiI("NPN_ReleaseObject npobj=%p\n", npobj)); uint32_t refcount = invoke_NPN_ReleaseObject(npobj); D(bugiD("NPN_ReleaseObject done (refcount: %d)\n", refcount)); if ((npobj->referenceCount = refcount) == 0) npobject_destroy(npobj); }
Bypass
0
g_NPN_ReleaseObject_Now(NPObject *npobj) { D(bugiI("NPN_ReleaseObject npobj=%p\n", npobj)); uint32_t refcount = invoke_NPN_ReleaseObject(npobj); D(bugiD("NPN_ReleaseObject done (refcount: %d)\n", refcount)); if ((npobj->referenceCount = refcount) == 0) npobject_destroy(npobj); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,639
g_NPN_ReleaseVariantValue(NPVariant *variant) { D(bugiI("NPN_ReleaseVariantValue\n")); npvariant_clear(variant); D(bugiD("NPN_ReleaseVariantValue done\n")); }
Bypass
0
g_NPN_ReleaseVariantValue(NPVariant *variant) { D(bugiI("NPN_ReleaseVariantValue\n")); npvariant_clear(variant); D(bugiD("NPN_ReleaseVariantValue done\n")); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,640
g_NPN_ReloadPlugins(NPBool reloadPages) { D(bug("NPN_ReloadPlugins reloadPages=%d\n", reloadPages)); NPW_UNIMPLEMENTED(); }
Bypass
0
g_NPN_ReloadPlugins(NPBool reloadPages) { D(bug("NPN_ReloadPlugins reloadPages=%d\n", reloadPages)); NPW_UNIMPLEMENTED(); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,641
g_NPN_RemoveProperty(NPP instance, NPObject *npobj, NPIdentifier propertyName) { if (!thread_check()) { npw_printf("WARNING: NPN_RemoveProperty not called from the main thread\n"); return false; } if (instance == NULL) return false; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return false; if (!npobj || !npobj->_class || !npobj->_class->removeProperty) return false; D(bugiI("NPN_RemoveProperty instance=%p, npobj=%p, propertyName=%p\n", instance, npobj, propertyName)); npw_plugin_instance_ref(plugin); bool ret = invoke_NPN_RemoveProperty(plugin, npobj, propertyName); npw_plugin_instance_unref(plugin); D(bugiD("NPN_RemoveProperty return: %d\n", ret)); return ret; }
Bypass
0
g_NPN_RemoveProperty(NPP instance, NPObject *npobj, NPIdentifier propertyName) { if (!thread_check()) { npw_printf("WARNING: NPN_RemoveProperty not called from the main thread\n"); return false; } if (instance == NULL) return false; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return false; if (!npobj || !npobj->_class || !npobj->_class->removeProperty) return false; D(bugiI("NPN_RemoveProperty instance=%p, npobj=%p, propertyName=%p\n", instance, npobj, propertyName)); npw_plugin_instance_ref(plugin); bool ret = invoke_NPN_RemoveProperty(plugin, npobj, propertyName); npw_plugin_instance_unref(plugin); D(bugiD("NPN_RemoveProperty return: %d\n", ret)); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,642
g_NPN_RequestRead(NPStream *stream, NPByteRange *rangeList) { if (!thread_check()) { npw_printf("WARNING: NPN_RequestRead not called from the main thread\n"); return NPERR_INVALID_INSTANCE_ERROR; } if (stream == NULL || stream->ndata == NULL || rangeList == NULL) return NPERR_INVALID_PARAM; D(bugiI("NPN_RequestRead stream=%p\n", stream)); NPError ret = invoke_NPN_RequestRead(stream, rangeList); D(bugiD("NPN_RequestRead return: %d [%s]\n", ret, string_of_NPError(ret))); return ret; }
Bypass
0
g_NPN_RequestRead(NPStream *stream, NPByteRange *rangeList) { if (!thread_check()) { npw_printf("WARNING: NPN_RequestRead not called from the main thread\n"); return NPERR_INVALID_INSTANCE_ERROR; } if (stream == NULL || stream->ndata == NULL || rangeList == NULL) return NPERR_INVALID_PARAM; D(bugiI("NPN_RequestRead stream=%p\n", stream)); NPError ret = invoke_NPN_RequestRead(stream, rangeList); D(bugiD("NPN_RequestRead return: %d [%s]\n", ret, string_of_NPError(ret))); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,643
g_NPN_RetainObject(NPObject *npobj) { if (!thread_check()) { npw_printf("WARNING: NPN_RetainObject not called from the main thread\n"); return NULL; } if (npobj == NULL) return NULL; D(bugiI("NPN_RetainObject npobj=%p\n", npobj)); uint32_t refcount = invoke_NPN_RetainObject(npobj); D(bugiD("NPN_RetainObject return: %p (refcount: %d)\n", npobj, refcount)); npobj->referenceCount = refcount; return npobj; }
Bypass
0
g_NPN_RetainObject(NPObject *npobj) { if (!thread_check()) { npw_printf("WARNING: NPN_RetainObject not called from the main thread\n"); return NULL; } if (npobj == NULL) return NULL; D(bugiI("NPN_RetainObject npobj=%p\n", npobj)); uint32_t refcount = invoke_NPN_RetainObject(npobj); D(bugiD("NPN_RetainObject return: %p (refcount: %d)\n", npobj, refcount)); npobj->referenceCount = refcount; return npobj; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,644
g_NPN_SetException(NPObject *npobj, const NPUTF8 *message) { if (!thread_check()) { npw_printf("WARNING: NPN_SetException not called from the main thread\n"); return; } D(bugiI("NPN_SetException npobj=%p, message='%s'\n", npobj, message)); invoke_NPN_SetException(npobj, message); D(bugiD("NPN_SetException done\n")); }
Bypass
0
g_NPN_SetException(NPObject *npobj, const NPUTF8 *message) { if (!thread_check()) { npw_printf("WARNING: NPN_SetException not called from the main thread\n"); return; } D(bugiI("NPN_SetException npobj=%p, message='%s'\n", npobj, message)); invoke_NPN_SetException(npobj, message); D(bugiD("NPN_SetException done\n")); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,645
g_NPN_SetProperty(NPP instance, NPObject *npobj, NPIdentifier propertyName, const NPVariant *value) { if (!thread_check()) { npw_printf("WARNING: NPN_SetProperty not called from the main thread\n"); return false; } if (instance == NULL) return false; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return false; if (!npobj || !npobj->_class || !npobj->_class->setProperty) return false; D(bugiI("NPN_SetProperty instance=%p, npobj=%p, propertyName=%p\n", instance, npobj, propertyName)); npw_plugin_instance_ref(plugin); bool ret = invoke_NPN_SetProperty(plugin, npobj, propertyName, value); npw_plugin_instance_unref(plugin); D(bugiD("NPN_SetProperty return: %d\n", ret)); return ret; }
Bypass
0
g_NPN_SetProperty(NPP instance, NPObject *npobj, NPIdentifier propertyName, const NPVariant *value) { if (!thread_check()) { npw_printf("WARNING: NPN_SetProperty not called from the main thread\n"); return false; } if (instance == NULL) return false; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return false; if (!npobj || !npobj->_class || !npobj->_class->setProperty) return false; D(bugiI("NPN_SetProperty instance=%p, npobj=%p, propertyName=%p\n", instance, npobj, propertyName)); npw_plugin_instance_ref(plugin); bool ret = invoke_NPN_SetProperty(plugin, npobj, propertyName, value); npw_plugin_instance_unref(plugin); D(bugiD("NPN_SetProperty return: %d\n", ret)); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,646
g_NPN_SetValue(NPP instance, NPPVariable variable, void *value) { if (!thread_check()) { npw_printf("WARNING: NPN_SetValue not called from the main thread\n"); return NPERR_INVALID_INSTANCE_ERROR; } if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return NPERR_INVALID_INSTANCE_ERROR; D(bugiI("NPN_SetValue instance=%p, variable=%d [%s]\n", instance, variable, string_of_NPPVariable(variable))); npw_plugin_instance_ref(plugin); NPError ret = invoke_NPN_SetValue(plugin, variable, value); npw_plugin_instance_unref(plugin); D(bugiD("NPN_SetValue return: %d [%s]\n", ret, string_of_NPError(ret))); return ret; }
Bypass
0
g_NPN_SetValue(NPP instance, NPPVariable variable, void *value) { if (!thread_check()) { npw_printf("WARNING: NPN_SetValue not called from the main thread\n"); return NPERR_INVALID_INSTANCE_ERROR; } if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return NPERR_INVALID_INSTANCE_ERROR; D(bugiI("NPN_SetValue instance=%p, variable=%d [%s]\n", instance, variable, string_of_NPPVariable(variable))); npw_plugin_instance_ref(plugin); NPError ret = invoke_NPN_SetValue(plugin, variable, value); npw_plugin_instance_unref(plugin); D(bugiD("NPN_SetValue return: %d [%s]\n", ret, string_of_NPError(ret))); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,647
g_NPN_Status(NPP instance, const char *message) { if (!thread_check()) { npw_printf("WARNING: NPN_Status not called from the main thread\n"); return; } PluginInstance *plugin = NULL; if (instance) plugin = PLUGIN_INSTANCE(instance); D(bugiI("NPN_Status instance=%p, message='%s'\n", instance, message)); npw_plugin_instance_ref(plugin); invoke_NPN_Status(plugin, message); npw_plugin_instance_unref(plugin); D(bugiD("NPN_Status done\n")); }
Bypass
0
g_NPN_Status(NPP instance, const char *message) { if (!thread_check()) { npw_printf("WARNING: NPN_Status not called from the main thread\n"); return; } PluginInstance *plugin = NULL; if (instance) plugin = PLUGIN_INSTANCE(instance); D(bugiI("NPN_Status instance=%p, message='%s'\n", instance, message)); npw_plugin_instance_ref(plugin); invoke_NPN_Status(plugin, message); npw_plugin_instance_unref(plugin); D(bugiD("NPN_Status done\n")); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,648
g_NPN_UserAgent(NPP instance) { if (!thread_check()) { npw_printf("WARNING: NPN_UserAgent not called from the main thread\n"); return NULL; } D(bugiI("NPN_UserAgent instance=%p\n", instance)); if (g_user_agent == NULL) g_user_agent = invoke_NPN_UserAgent(); D(bugiD("NPN_UserAgent return: '%s'\n", g_user_agent)); return g_user_agent; }
Bypass
0
g_NPN_UserAgent(NPP instance) { if (!thread_check()) { npw_printf("WARNING: NPN_UserAgent not called from the main thread\n"); return NULL; } D(bugiI("NPN_UserAgent instance=%p\n", instance)); if (g_user_agent == NULL) g_user_agent = invoke_NPN_UserAgent(); D(bugiD("NPN_UserAgent return: '%s'\n", g_user_agent)); return g_user_agent; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,649
g_NPN_Write(NPP instance, NPStream *stream, int32_t len, void *buf) { if (!thread_check()) { npw_printf("WARNING: NPN_Write not called from the main thread\n"); return -1; } if (instance == NULL) return -1; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return -1; if (stream == NULL) return -1; D(bugiI("NPN_Write instance=%p, stream=%p, len=%d, buf=%p\n", instance, stream, len, buf)); npw_plugin_instance_ref(plugin); int32_t ret = invoke_NPN_Write(plugin, stream, len, buf); npw_plugin_instance_unref(plugin); D(bugiD("NPN_Write return: %d\n", ret)); return ret; }
Bypass
0
g_NPN_Write(NPP instance, NPStream *stream, int32_t len, void *buf) { if (!thread_check()) { npw_printf("WARNING: NPN_Write not called from the main thread\n"); return -1; } if (instance == NULL) return -1; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return -1; if (stream == NULL) return -1; D(bugiI("NPN_Write instance=%p, stream=%p, len=%d, buf=%p\n", instance, stream, len, buf)); npw_plugin_instance_ref(plugin); int32_t ret = invoke_NPN_Write(plugin, stream, len, buf); npw_plugin_instance_unref(plugin); D(bugiD("NPN_Write return: %d\n", ret)); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,650
g_NPP_DestroyStream(NPP instance, NPStream *stream, NPReason reason) { if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; if (plugin_funcs.destroystream == NULL) return NPERR_INVALID_FUNCTABLE_ERROR; if (stream == NULL) return NPERR_INVALID_PARAM; D(bugiI("NPP_DestroyStream instance=%p, stream=%p, reason=%s\n", instance, stream, string_of_NPReason(reason))); NPError ret = plugin_funcs.destroystream(instance, stream, reason); D(bugiD("NPP_DestroyStream return: %d [%s]\n", ret, string_of_NPError(ret))); StreamInstance *stream_ndata = stream->ndata; if (stream_ndata) { id_remove(stream_ndata->stream_id); free(stream_ndata); } free((char *)stream->url); free((char *)stream->headers); free(stream); return ret; }
Bypass
0
g_NPP_DestroyStream(NPP instance, NPStream *stream, NPReason reason) { if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; if (plugin_funcs.destroystream == NULL) return NPERR_INVALID_FUNCTABLE_ERROR; if (stream == NULL) return NPERR_INVALID_PARAM; D(bugiI("NPP_DestroyStream instance=%p, stream=%p, reason=%s\n", instance, stream, string_of_NPReason(reason))); NPError ret = plugin_funcs.destroystream(instance, stream, reason); D(bugiD("NPP_DestroyStream return: %d [%s]\n", ret, string_of_NPError(ret))); StreamInstance *stream_ndata = stream->ndata; if (stream_ndata) { id_remove(stream_ndata->stream_id); free(stream_ndata); } free((char *)stream->url); free((char *)stream->headers); free(stream); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,651
static NPError g_NPP_Destroy_Now(PluginInstance *plugin, NPSavedData **save) { D(bug("g_NPP_Destroy_Now\n")); NPSavedData *save_area = NULL; NPError ret = g_NPP_Destroy(PLUGIN_INSTANCE_NPP(plugin), &save_area); if (save) { *save = save_area; } else if (save_area) { npw_printf("WARNING: NPP_Destroy returned save_area, but it was ignored\n"); if (save_area->buf) NPN_MemFree(save_area->buf); NPN_MemFree(save_area); } rpc_connection_unref(g_rpc_connection); return ret; }
Bypass
0
static NPError g_NPP_Destroy_Now(PluginInstance *plugin, NPSavedData **save) { D(bug("g_NPP_Destroy_Now\n")); NPSavedData *save_area = NULL; NPError ret = g_NPP_Destroy(PLUGIN_INSTANCE_NPP(plugin), &save_area); if (save) { *save = save_area; } else if (save_area) { npw_printf("WARNING: NPP_Destroy returned save_area, but it was ignored\n"); if (save_area->buf) NPN_MemFree(save_area->buf); NPN_MemFree(save_area); } rpc_connection_unref(g_rpc_connection); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,652
static NPError g_NPP_New(NPMIMEType plugin_type, uint32_t instance_id, uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData *saved) { PluginInstance *plugin = npw_plugin_instance_new(&PluginInstanceClass); if (plugin == NULL) return NPERR_OUT_OF_MEMORY_ERROR; plugin->instance_id = instance_id; id_link(instance_id, plugin); NPP instance = malloc(sizeof(*instance)); if (instance == NULL) return NPERR_OUT_OF_MEMORY_ERROR; memset(instance, 0, sizeof(*instance)); instance->ndata = plugin; plugin->instance = instance; for (int i = 0; i < argc; i++) { if (argn[i] == NULL) continue; if (strcasecmp(argn[i], "width") == 0) { if (i < argc && argv[i]) plugin->width = atoi(argv[i]); } else if (strcasecmp(argn[i], "height") == 0) { if (i < argc && argv[i]) plugin->height = atoi(argv[i]); } } D(bugiI("NPP_New instance=%p\n", instance)); NPError ret = plugin_funcs.newp(plugin_type, instance, mode, argc, argn, argv, saved); D(bugiD("NPP_New return: %d [%s]\n", ret, string_of_NPError(ret))); long supports_XEmbed = FALSE; if (mozilla_funcs.getvalue) { NPError error = mozilla_funcs.getvalue(NULL, NPNVSupportsXEmbedBool, (void *)&supports_XEmbed); if (error == NPERR_NO_ERROR && plugin_funcs.getvalue) { long needs_XEmbed = FALSE; error = plugin_funcs.getvalue(instance, NPPVpluginNeedsXEmbed, (void *)&needs_XEmbed); if (error == NPERR_NO_ERROR) plugin->use_xembed = supports_XEmbed && needs_XEmbed; } } if (!plugin->use_xembed) { if (xt_source_create() < 0) return NPERR_GENERIC_ERROR; } return ret; }
Bypass
0
static NPError g_NPP_New(NPMIMEType plugin_type, uint32_t instance_id, uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData *saved) { PluginInstance *plugin = npw_plugin_instance_new(&PluginInstanceClass); if (plugin == NULL) return NPERR_OUT_OF_MEMORY_ERROR; plugin->instance_id = instance_id; id_link(instance_id, plugin); NPP instance = malloc(sizeof(*instance)); if (instance == NULL) return NPERR_OUT_OF_MEMORY_ERROR; memset(instance, 0, sizeof(*instance)); instance->ndata = plugin; plugin->instance = instance; for (int i = 0; i < argc; i++) { if (argn[i] == NULL) continue; if (strcasecmp(argn[i], "width") == 0) { if (i < argc && argv[i]) plugin->width = atoi(argv[i]); } else if (strcasecmp(argn[i], "height") == 0) { if (i < argc && argv[i]) plugin->height = atoi(argv[i]); } } D(bugiI("NPP_New instance=%p\n", instance)); NPError ret = plugin_funcs.newp(plugin_type, instance, mode, argc, argn, argv, saved); D(bugiD("NPP_New return: %d [%s]\n", ret, string_of_NPError(ret))); long supports_XEmbed = FALSE; if (mozilla_funcs.getvalue) { NPError error = mozilla_funcs.getvalue(NULL, NPNVSupportsXEmbedBool, (void *)&supports_XEmbed); if (error == NPERR_NO_ERROR && plugin_funcs.getvalue) { long needs_XEmbed = FALSE; error = plugin_funcs.getvalue(instance, NPPVpluginNeedsXEmbed, (void *)&needs_XEmbed); if (error == NPERR_NO_ERROR) plugin->use_xembed = supports_XEmbed && needs_XEmbed; } } if (!plugin->use_xembed) { if (xt_source_create() < 0) return NPERR_GENERIC_ERROR; } return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,653
g_NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream, NPBool seekable, uint16_t *stype) { if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; if (plugin_funcs.newstream == NULL) return NPERR_INVALID_FUNCTABLE_ERROR; D(bugiI("NPP_NewStream instance=%p, stream=%p, url='%s', type='%s', seekable=%d, stype=%s, notifyData=%p\n", instance, stream, stream->url, type, seekable, string_of_NPStreamType(*stype), stream->notifyData)); NPError ret = plugin_funcs.newstream(instance, type, stream, seekable, stype); D(bugiD("NPP_NewStream return: %d [%s], stype=%s\n", ret, string_of_NPError(ret), string_of_NPStreamType(*stype))); return ret; }
Bypass
0
g_NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream, NPBool seekable, uint16_t *stype) { if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; if (plugin_funcs.newstream == NULL) return NPERR_INVALID_FUNCTABLE_ERROR; D(bugiI("NPP_NewStream instance=%p, stream=%p, url='%s', type='%s', seekable=%d, stype=%s, notifyData=%p\n", instance, stream, stream->url, type, seekable, string_of_NPStreamType(*stype), stream->notifyData)); NPError ret = plugin_funcs.newstream(instance, type, stream, seekable, stype); D(bugiD("NPP_NewStream return: %d [%s], stype=%s\n", ret, string_of_NPError(ret), string_of_NPStreamType(*stype))); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,654
g_NPP_SetWindow(NPP instance, NPWindow *np_window) { if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return NPERR_INVALID_INSTANCE_ERROR; if (plugin_funcs.setwindow == NULL) return NPERR_INVALID_FUNCTABLE_ERROR; plugin->is_windowless = np_window && np_window->type == NPWindowTypeDrawable; NPWindow *window = np_window; if (window && (window->window || plugin->is_windowless)) { if (plugin->toolkit_data) { if (update_window(plugin, window) < 0) return NPERR_GENERIC_ERROR; } else { if (create_window(plugin, window) < 0) return NPERR_GENERIC_ERROR; } window = &plugin->window; } D(bugiI("NPP_SetWindow instance=%p, window=%p\n", instance, window ? window->window : NULL)); NPError ret = plugin_funcs.setwindow(instance, window); D(bugiD("NPP_SetWindow return: %d [%s]\n", ret, string_of_NPError(ret))); if (np_window == NULL || (np_window->window == NULL && !plugin->is_windowless)) destroy_window(plugin); return ret; }
Bypass
0
g_NPP_SetWindow(NPP instance, NPWindow *np_window) { if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return NPERR_INVALID_INSTANCE_ERROR; if (plugin_funcs.setwindow == NULL) return NPERR_INVALID_FUNCTABLE_ERROR; plugin->is_windowless = np_window && np_window->type == NPWindowTypeDrawable; NPWindow *window = np_window; if (window && (window->window || plugin->is_windowless)) { if (plugin->toolkit_data) { if (update_window(plugin, window) < 0) return NPERR_GENERIC_ERROR; } else { if (create_window(plugin, window) < 0) return NPERR_GENERIC_ERROR; } window = &plugin->window; } D(bugiI("NPP_SetWindow instance=%p, window=%p\n", instance, window ? window->window : NULL)); NPError ret = plugin_funcs.setwindow(instance, window); D(bugiD("NPP_SetWindow return: %d [%s]\n", ret, string_of_NPError(ret))); if (np_window == NULL || (np_window->window == NULL && !plugin->is_windowless)) destroy_window(plugin); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,655
g_NPP_StreamAsFile(NPP instance, NPStream *stream, const char *fname) { if (instance == NULL) return; if (plugin_funcs.asfile == NULL) return; if (stream == NULL) return; D(bugiI("NPP_StreamAsFile instance=%p, stream=%p, fname='%s'\n", instance, stream, fname)); plugin_funcs.asfile(instance, stream, fname); D(bugiD("NPP_StreamAsFile done\n")); }
Bypass
0
g_NPP_StreamAsFile(NPP instance, NPStream *stream, const char *fname) { if (instance == NULL) return; if (plugin_funcs.asfile == NULL) return; if (stream == NULL) return; D(bugiI("NPP_StreamAsFile instance=%p, stream=%p, fname='%s'\n", instance, stream, fname)); plugin_funcs.asfile(instance, stream, fname); D(bugiD("NPP_StreamAsFile done\n")); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,656
g_NPP_URLNotify(NPP instance, const char *url, NPReason reason, void *notifyData) { if (instance == NULL) return; if (plugin_funcs.urlnotify == NULL) return; D(bugiI("NPP_URLNotify instance=%p, url='%s', reason=%s, notifyData=%p\n", instance, url, string_of_NPReason(reason), notifyData)); plugin_funcs.urlnotify(instance, url, reason, notifyData); D(bugiD("NPP_URLNotify done\n")); }
Bypass
0
g_NPP_URLNotify(NPP instance, const char *url, NPReason reason, void *notifyData) { if (instance == NULL) return; if (plugin_funcs.urlnotify == NULL) return; D(bugiI("NPP_URLNotify instance=%p, url='%s', reason=%s, notifyData=%p\n", instance, url, string_of_NPReason(reason), notifyData)); plugin_funcs.urlnotify(instance, url, reason, notifyData); D(bugiD("NPP_URLNotify done\n")); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,657
g_NPP_Write(NPP instance, NPStream *stream, int32_t offset, int32_t len, void *buf) { if (instance == NULL) return -1; if (plugin_funcs.write == NULL) return -1; if (stream == NULL) return -1; D(bugiI("NPP_Write instance=%p, stream=%p, offset=%d, len=%d, buf=%p\n", instance, stream, offset, len, buf)); int32_t ret = plugin_funcs.write(instance, stream, offset, len, buf); D(bugiD("NPP_Write return: %d\n", ret)); return ret; }
Bypass
0
g_NPP_Write(NPP instance, NPStream *stream, int32_t offset, int32_t len, void *buf) { if (instance == NULL) return -1; if (plugin_funcs.write == NULL) return -1; if (stream == NULL) return -1; D(bugiI("NPP_Write instance=%p, stream=%p, offset=%d, len=%d, buf=%p\n", instance, stream, offset, len, buf)); int32_t ret = plugin_funcs.write(instance, stream, offset, len, buf); D(bugiD("NPP_Write return: %d\n", ret)); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,658
g_NPP_WriteReady(NPP instance, NPStream *stream) { if (instance == NULL) return 0; if (plugin_funcs.writeready == NULL) return 0; if (stream == NULL) return 0; D(bugiI("NPP_WriteReady instance=%p, stream=%p\n", instance, stream)); int32_t ret = plugin_funcs.writeready(instance, stream); D(bugiD("NPP_WriteReady return: %d\n", ret)); return ret; }
Bypass
0
g_NPP_WriteReady(NPP instance, NPStream *stream) { if (instance == NULL) return 0; if (plugin_funcs.writeready == NULL) return 0; if (stream == NULL) return 0; D(bugiI("NPP_WriteReady instance=%p, stream=%p\n", instance, stream)); int32_t ret = plugin_funcs.writeready(instance, stream); D(bugiD("NPP_WriteReady return: %d\n", ret)); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,659
g_NP_GetMIMEDescription(void) { if (g_plugin_NP_GetMIMEDescription == NULL) return NULL; D(bugiI("NP_GetMIMEDescription\n")); char *str = g_plugin_NP_GetMIMEDescription(); D(bugiD("NP_GetMIMEDescription return: %s\n", str ? str : "<empty>")); return str; }
Bypass
0
g_NP_GetMIMEDescription(void) { if (g_plugin_NP_GetMIMEDescription == NULL) return NULL; D(bugiI("NP_GetMIMEDescription\n")); char *str = g_plugin_NP_GetMIMEDescription(); D(bugiD("NP_GetMIMEDescription return: %s\n", str ? str : "<empty>")); return str; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,660
g_NP_Shutdown(void) { if (g_plugin_NP_Shutdown == NULL) return NPERR_INVALID_FUNCTABLE_ERROR; D(bugiI("NP_Shutdown\n")); NPError ret = g_plugin_NP_Shutdown(); D(bugiD("NP_Shutdown done\n")); if (NPN_HAS_FEATURE(NPRUNTIME_SCRIPTING)) npobject_bridge_destroy(); gtk_main_quit(); return ret; }
Bypass
0
g_NP_Shutdown(void) { if (g_plugin_NP_Shutdown == NULL) return NPERR_INVALID_FUNCTABLE_ERROR; D(bugiI("NP_Shutdown\n")); NPError ret = g_plugin_NP_Shutdown(); D(bugiD("NP_Shutdown done\n")); if (NPN_HAS_FEATURE(NPRUNTIME_SCRIPTING)) npobject_bridge_destroy(); gtk_main_quit(); return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,661
static int get_appcontext_input_count(void) { static int input_count_offset = -1; if (input_count_offset < 0) input_count_offset = get_appcontext_input_count_offset(); if (input_count_offset == 0) return 1; /* fake we have input to trigger timeout */ return get_appcontext_input_count_at(input_count_offset); }
Bypass
0
static int get_appcontext_input_count(void) { static int input_count_offset = -1; if (input_count_offset < 0) input_count_offset = get_appcontext_input_count_offset(); if (input_count_offset == 0) return 1; /* fake we have input to trigger timeout */ return get_appcontext_input_count_at(input_count_offset); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,662
static inline int get_appcontext_input_count_at(int offset) { return *((short *)((char *)x_app_context + offset)); }
Bypass
0
static inline int get_appcontext_input_count_at(int offset) { return *((short *)((char *)x_app_context + offset)); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,663
static int get_appcontext_input_count_offset(void) { #define low_offset offsetof(struct _XtAppStruct, __maxed__nfds) #define high_offset offsetof(struct _XtAppStruct, __maybe__input_max) #define n_offsets_max (high_offset - low_offset)/2 int i, ofs, n_offsets = 0; int offsets[n_offsets_max] = { 0, }; #define n_inputs_max 4 /* number of refinements/input sources */ int fd, id, n_inputs = 0; struct { int fd, id; } inputs[n_inputs_max] = { 0, }; if ((fd = open("/dev/null", O_WRONLY)) < 0) return 0; if ((id = add_appcontext_input(fd, 0)) < 0) { close(fd); return 0; } inputs[n_inputs].fd = fd; inputs[n_inputs].id = id; n_inputs++; for (ofs = low_offset; ofs < high_offset; ofs += 2) { if (get_appcontext_input_count_at(ofs) == 1) offsets[n_offsets++] = ofs; } while (n_inputs < n_inputs_max) { if ((fd = open("/dev/null", O_WRONLY)) < 0) break; if ((id = add_appcontext_input(fd, n_inputs)) < 0) { close(fd); break; } inputs[n_inputs].fd = fd; inputs[n_inputs].id = id; n_inputs++; int n = 0; for (i = 0; i < n_offsets; i++) { if (get_appcontext_input_count_at(offsets[i]) == n_inputs) offsets[n++] = offsets[i]; } for (i = n; i < n_offsets; i++) offsets[i] = 0; n_offsets = n; } for (i = 0; i < n_inputs; i++) { XtRemoveInput(inputs[i].id); close(inputs[i].fd); } if (n_offsets == 1) return offsets[0]; #undef n_fds_max #undef n_offsets_max #undef high_offset #undef low_offset return 0; }
Bypass
0
static int get_appcontext_input_count_offset(void) { #define low_offset offsetof(struct _XtAppStruct, __maxed__nfds) #define high_offset offsetof(struct _XtAppStruct, __maybe__input_max) #define n_offsets_max (high_offset - low_offset)/2 int i, ofs, n_offsets = 0; int offsets[n_offsets_max] = { 0, }; #define n_inputs_max 4 /* number of refinements/input sources */ int fd, id, n_inputs = 0; struct { int fd, id; } inputs[n_inputs_max] = { 0, }; if ((fd = open("/dev/null", O_WRONLY)) < 0) return 0; if ((id = add_appcontext_input(fd, 0)) < 0) { close(fd); return 0; } inputs[n_inputs].fd = fd; inputs[n_inputs].id = id; n_inputs++; for (ofs = low_offset; ofs < high_offset; ofs += 2) { if (get_appcontext_input_count_at(ofs) == 1) offsets[n_offsets++] = ofs; } while (n_inputs < n_inputs_max) { if ((fd = open("/dev/null", O_WRONLY)) < 0) break; if ((id = add_appcontext_input(fd, n_inputs)) < 0) { close(fd); break; } inputs[n_inputs].fd = fd; inputs[n_inputs].id = id; n_inputs++; int n = 0; for (i = 0; i < n_offsets; i++) { if (get_appcontext_input_count_at(offsets[i]) == n_inputs) offsets[n++] = offsets[i]; } for (i = n; i < n_offsets; i++) offsets[i] = 0; n_offsets = n; } for (i = 0; i < n_inputs; i++) { XtRemoveInput(inputs[i].id); close(inputs[i].fd); } if (n_offsets == 1) return offsets[0]; #undef n_fds_max #undef n_offsets_max #undef high_offset #undef low_offset return 0; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,664
static int handle_NPP_Destroy(rpc_connection_t *connection) { D(bug("handle_NPP_Destroy\n")); int error; PluginInstance *plugin; error = rpc_method_get_args(connection, RPC_TYPE_NPW_PLUGIN_INSTANCE, &plugin, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPP_Destroy() get args", error); return error; } NPSavedData *save_area = NULL; NPError ret = NPERR_NO_ERROR; /* Take a ref for the rpc_method_send_reply; otherwise the * rpc_connection_unref in g_NPP_Destroy_Now may cause a slight * nuisance. */ rpc_connection_ref(connection); if (!rpc_method_in_invoke(connection)) { /* The plugin is not on the stack; it's safe to call this. */ D(bug("NPP_Destroy is fine.\n")); ret = g_NPP_Destroy_Now(plugin, &save_area); } else { /* It is not safe to call NPP_Destroy right now. Delay it until we * return to the event loop. * * NOTE: This means that the browser never sees the real return * value of NPP_Destroy; the NPSavedData will be discarded, and any * error code will be ignored. */ D(bug("NPP_Destroy raced; delaying it to get a clean stack.\n")); delayed_destroys_add(plugin); } error = rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_NP_SAVED_DATA, save_area, RPC_TYPE_INVALID); if (save_area) { if (save_area->buf) NPN_MemFree(save_area->buf); NPN_MemFree(save_area); } rpc_connection_unref(connection); return error; }
Bypass
0
static int handle_NPP_Destroy(rpc_connection_t *connection) { D(bug("handle_NPP_Destroy\n")); int error; PluginInstance *plugin; error = rpc_method_get_args(connection, RPC_TYPE_NPW_PLUGIN_INSTANCE, &plugin, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPP_Destroy() get args", error); return error; } NPSavedData *save_area = NULL; NPError ret = NPERR_NO_ERROR; /* Take a ref for the rpc_method_send_reply; otherwise the * rpc_connection_unref in g_NPP_Destroy_Now may cause a slight * nuisance. */ rpc_connection_ref(connection); if (!rpc_method_in_invoke(connection)) { /* The plugin is not on the stack; it's safe to call this. */ D(bug("NPP_Destroy is fine.\n")); ret = g_NPP_Destroy_Now(plugin, &save_area); } else { /* It is not safe to call NPP_Destroy right now. Delay it until we * return to the event loop. * * NOTE: This means that the browser never sees the real return * value of NPP_Destroy; the NPSavedData will be discarded, and any * error code will be ignored. */ D(bug("NPP_Destroy raced; delaying it to get a clean stack.\n")); delayed_destroys_add(plugin); } error = rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_NP_SAVED_DATA, save_area, RPC_TYPE_INVALID); if (save_area) { if (save_area->buf) NPN_MemFree(save_area->buf); NPN_MemFree(save_area); } rpc_connection_unref(connection); return error; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,665
static int handle_NPP_DestroyStream(rpc_connection_t *connection) { D(bug("handle_NPP_DestroyStream\n")); PluginInstance *plugin; NPStream *stream; int32_t reason; int error = rpc_method_get_args(connection, RPC_TYPE_NPW_PLUGIN_INSTANCE, &plugin, RPC_TYPE_NP_STREAM, &stream, RPC_TYPE_INT32, &reason, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPP_DestroyStream() get args", error); return error; } NPError ret = g_NPP_DestroyStream(PLUGIN_INSTANCE_NPP(plugin), stream, reason); return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_INVALID); }
Bypass
0
static int handle_NPP_DestroyStream(rpc_connection_t *connection) { D(bug("handle_NPP_DestroyStream\n")); PluginInstance *plugin; NPStream *stream; int32_t reason; int error = rpc_method_get_args(connection, RPC_TYPE_NPW_PLUGIN_INSTANCE, &plugin, RPC_TYPE_NP_STREAM, &stream, RPC_TYPE_INT32, &reason, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPP_DestroyStream() get args", error); return error; } NPError ret = g_NPP_DestroyStream(PLUGIN_INSTANCE_NPP(plugin), stream, reason); return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_INVALID); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,666
static int handle_NPP_GetValue(rpc_connection_t *connection) { D(bug("handle_NPP_GetValue\n")); int error; PluginInstance *plugin; int32_t variable; error = rpc_method_get_args(connection, RPC_TYPE_NPW_PLUGIN_INSTANCE, &plugin, RPC_TYPE_INT32, &variable, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_printf("ERROR: could not get NPP_GetValue variable\n"); return error; } NPError ret = NPERR_GENERIC_ERROR; int variable_type = rpc_type_of_NPPVariable(variable); switch (variable_type) { case RPC_TYPE_STRING: { char *str = NULL; ret = g_NPP_GetValue(PLUGIN_INSTANCE_NPP(plugin), variable, (void *)&str); return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_STRING, str, RPC_TYPE_INVALID); } case RPC_TYPE_INT32: { uint32_t n = 0; ret = g_NPP_GetValue(PLUGIN_INSTANCE_NPP(plugin), variable, (void *)&n); return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_INT32, n, RPC_TYPE_INVALID); } case RPC_TYPE_BOOLEAN: { NPBool b = FALSE; ret = g_NPP_GetValue(PLUGIN_INSTANCE_NPP(plugin), variable, (void *)&b); return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_BOOLEAN, b, RPC_TYPE_INVALID); } case RPC_TYPE_NP_OBJECT: { NPObject *npobj = NULL; ret = g_NPP_GetValue(PLUGIN_INSTANCE_NPP(plugin), variable, (void *)&npobj); return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_NP_OBJECT, npobj, RPC_TYPE_INVALID); } } abort(); }
Bypass
0
static int handle_NPP_GetValue(rpc_connection_t *connection) { D(bug("handle_NPP_GetValue\n")); int error; PluginInstance *plugin; int32_t variable; error = rpc_method_get_args(connection, RPC_TYPE_NPW_PLUGIN_INSTANCE, &plugin, RPC_TYPE_INT32, &variable, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_printf("ERROR: could not get NPP_GetValue variable\n"); return error; } NPError ret = NPERR_GENERIC_ERROR; int variable_type = rpc_type_of_NPPVariable(variable); switch (variable_type) { case RPC_TYPE_STRING: { char *str = NULL; ret = g_NPP_GetValue(PLUGIN_INSTANCE_NPP(plugin), variable, (void *)&str); return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_STRING, str, RPC_TYPE_INVALID); } case RPC_TYPE_INT32: { uint32_t n = 0; ret = g_NPP_GetValue(PLUGIN_INSTANCE_NPP(plugin), variable, (void *)&n); return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_INT32, n, RPC_TYPE_INVALID); } case RPC_TYPE_BOOLEAN: { NPBool b = FALSE; ret = g_NPP_GetValue(PLUGIN_INSTANCE_NPP(plugin), variable, (void *)&b); return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_BOOLEAN, b, RPC_TYPE_INVALID); } case RPC_TYPE_NP_OBJECT: { NPObject *npobj = NULL; ret = g_NPP_GetValue(PLUGIN_INSTANCE_NPP(plugin), variable, (void *)&npobj); return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_NP_OBJECT, npobj, RPC_TYPE_INVALID); } } abort(); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,667
static int handle_NPP_New(rpc_connection_t *connection) { D(bug("handle_NPP_New\n")); rpc_connection_ref(connection); uint32_t instance_id; NPMIMEType plugin_type; int32_t mode; int argn_count, argv_count; char **argn, **argv; NPSavedData *saved; int error = rpc_method_get_args(connection, RPC_TYPE_UINT32, &instance_id, RPC_TYPE_STRING, &plugin_type, RPC_TYPE_INT32, &mode, RPC_TYPE_ARRAY, RPC_TYPE_STRING, &argn_count, &argn, RPC_TYPE_ARRAY, RPC_TYPE_STRING, &argv_count, &argv, RPC_TYPE_NP_SAVED_DATA, &saved, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPP_New() get args", error); return error; } assert(argn_count == argv_count); NPError ret = g_NPP_New(plugin_type, instance_id, mode, argn_count, argn, argv, saved); if (plugin_type) free(plugin_type); if (argn) { for (int i = 0; i < argn_count; i++) free(argn[i]); free(argn); } if (argv) { for (int i = 0; i < argv_count; i++) free(argv[i]); free(argv); } if (saved) { if (saved->buf) NPN_MemFree(saved->buf); NPN_MemFree(saved); } return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_INVALID); }
Bypass
0
static int handle_NPP_New(rpc_connection_t *connection) { D(bug("handle_NPP_New\n")); rpc_connection_ref(connection); uint32_t instance_id; NPMIMEType plugin_type; int32_t mode; int argn_count, argv_count; char **argn, **argv; NPSavedData *saved; int error = rpc_method_get_args(connection, RPC_TYPE_UINT32, &instance_id, RPC_TYPE_STRING, &plugin_type, RPC_TYPE_INT32, &mode, RPC_TYPE_ARRAY, RPC_TYPE_STRING, &argn_count, &argn, RPC_TYPE_ARRAY, RPC_TYPE_STRING, &argv_count, &argv, RPC_TYPE_NP_SAVED_DATA, &saved, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPP_New() get args", error); return error; } assert(argn_count == argv_count); NPError ret = g_NPP_New(plugin_type, instance_id, mode, argn_count, argn, argv, saved); if (plugin_type) free(plugin_type); if (argn) { for (int i = 0; i < argn_count; i++) free(argn[i]); free(argn); } if (argv) { for (int i = 0; i < argv_count; i++) free(argv[i]); free(argv); } if (saved) { if (saved->buf) NPN_MemFree(saved->buf); NPN_MemFree(saved); } return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_INVALID); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,668
static int handle_NPP_NewStream(rpc_connection_t *connection) { D(bug("handle_NPP_NewStream\n")); int error; PluginInstance *plugin; uint32_t stream_id; uint32_t seekable; NPMIMEType type; NPStream *stream; if ((stream = malloc(sizeof(*stream))) == NULL) return RPC_ERROR_NO_MEMORY; memset(stream, 0, sizeof(*stream)); error = rpc_method_get_args(connection, RPC_TYPE_NPW_PLUGIN_INSTANCE, &plugin, RPC_TYPE_STRING, &type, RPC_TYPE_UINT32, &stream_id, RPC_TYPE_STRING, &stream->url, RPC_TYPE_UINT32, &stream->end, RPC_TYPE_UINT32, &stream->lastmodified, RPC_TYPE_NP_NOTIFY_DATA, &stream->notifyData, RPC_TYPE_STRING, &stream->headers, RPC_TYPE_BOOLEAN, &seekable, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPP_NewStream() get args", error); return error; } StreamInstance *stream_ndata; if ((stream_ndata = malloc(sizeof(*stream_ndata))) == NULL) return RPC_ERROR_NO_MEMORY; stream->ndata = stream_ndata; memset(stream_ndata, 0, sizeof(*stream_ndata)); stream_ndata->stream_id = stream_id; id_link(stream_id, stream_ndata); stream_ndata->stream = stream; stream_ndata->is_plugin_stream = 0; uint16_t stype = NP_NORMAL; NPError ret = g_NPP_NewStream(PLUGIN_INSTANCE_NPP(plugin), type, stream, seekable, &stype); if (type) free(type); return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_UINT32, (uint32_t)stype, RPC_TYPE_NP_NOTIFY_DATA, stream->notifyData, RPC_TYPE_INVALID); }
Bypass
0
static int handle_NPP_NewStream(rpc_connection_t *connection) { D(bug("handle_NPP_NewStream\n")); int error; PluginInstance *plugin; uint32_t stream_id; uint32_t seekable; NPMIMEType type; NPStream *stream; if ((stream = malloc(sizeof(*stream))) == NULL) return RPC_ERROR_NO_MEMORY; memset(stream, 0, sizeof(*stream)); error = rpc_method_get_args(connection, RPC_TYPE_NPW_PLUGIN_INSTANCE, &plugin, RPC_TYPE_STRING, &type, RPC_TYPE_UINT32, &stream_id, RPC_TYPE_STRING, &stream->url, RPC_TYPE_UINT32, &stream->end, RPC_TYPE_UINT32, &stream->lastmodified, RPC_TYPE_NP_NOTIFY_DATA, &stream->notifyData, RPC_TYPE_STRING, &stream->headers, RPC_TYPE_BOOLEAN, &seekable, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPP_NewStream() get args", error); return error; } StreamInstance *stream_ndata; if ((stream_ndata = malloc(sizeof(*stream_ndata))) == NULL) return RPC_ERROR_NO_MEMORY; stream->ndata = stream_ndata; memset(stream_ndata, 0, sizeof(*stream_ndata)); stream_ndata->stream_id = stream_id; id_link(stream_id, stream_ndata); stream_ndata->stream = stream; stream_ndata->is_plugin_stream = 0; uint16_t stype = NP_NORMAL; NPError ret = g_NPP_NewStream(PLUGIN_INSTANCE_NPP(plugin), type, stream, seekable, &stype); if (type) free(type); return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_UINT32, (uint32_t)stype, RPC_TYPE_NP_NOTIFY_DATA, stream->notifyData, RPC_TYPE_INVALID); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,669
static int handle_NPP_Print(rpc_connection_t *connection) { D(bug("handle_NPP_Print\n")); PluginInstance *plugin; NPPrint printInfo; uint32_t platform_print_id; int error = rpc_method_get_args(connection, RPC_TYPE_NPW_PLUGIN_INSTANCE, &plugin, RPC_TYPE_UINT32, &platform_print_id, RPC_TYPE_NP_PRINT, &printInfo, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPP_Print() get args", error); return error; } NPPrintCallbackStruct printer; printer.type = NP_PRINT; printer.fp = platform_print_id ? tmpfile() : NULL; switch (printInfo.mode) { case NP_FULL: printInfo.print.fullPrint.platformPrint = &printer; break; case NP_EMBED: printInfo.print.embedPrint.platformPrint = &printer; create_window_attributes(printInfo.print.embedPrint.window.ws_info); break; } g_NPP_Print(PLUGIN_INSTANCE_NPP(plugin), &printInfo); if (printer.fp) { long file_size = ftell(printer.fp); D(bug(" writeback data [%d bytes]\n", file_size)); rewind(printer.fp); if (file_size > 0) { NPPrintData printData; const int printDataMaxSize = sizeof(printData.data); int n = file_size / printDataMaxSize; while (--n >= 0) { printData.size = printDataMaxSize; if (fread(&printData.data, sizeof(printData.data), 1, printer.fp) != 1) { npw_printf("ERROR: unexpected end-of-file or error condition in NPP_Print\n"); break; } npw_plugin_instance_ref(plugin); invoke_NPN_PrintData(plugin, platform_print_id, &printData); npw_plugin_instance_unref(plugin); } printData.size = file_size % printDataMaxSize; if (fread(&printData.data, printData.size, 1, printer.fp) != 1) npw_printf("ERROR: unexpected end-of-file or error condition in NPP_Print\n"); npw_plugin_instance_ref(plugin); invoke_NPN_PrintData(plugin, platform_print_id, &printData); npw_plugin_instance_unref(plugin); } fclose(printer.fp); } if (printInfo.mode == NP_EMBED) { NPWindow *window = &printInfo.print.embedPrint.window; if (window->ws_info) { destroy_window_attributes(window->ws_info); window->ws_info = NULL; } } uint32_t plugin_printed = FALSE; if (printInfo.mode == NP_FULL) plugin_printed = printInfo.print.fullPrint.pluginPrinted; return rpc_method_send_reply(connection, RPC_TYPE_BOOLEAN, plugin_printed, RPC_TYPE_INVALID); }
Bypass
0
static int handle_NPP_Print(rpc_connection_t *connection) { D(bug("handle_NPP_Print\n")); PluginInstance *plugin; NPPrint printInfo; uint32_t platform_print_id; int error = rpc_method_get_args(connection, RPC_TYPE_NPW_PLUGIN_INSTANCE, &plugin, RPC_TYPE_UINT32, &platform_print_id, RPC_TYPE_NP_PRINT, &printInfo, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPP_Print() get args", error); return error; } NPPrintCallbackStruct printer; printer.type = NP_PRINT; printer.fp = platform_print_id ? tmpfile() : NULL; switch (printInfo.mode) { case NP_FULL: printInfo.print.fullPrint.platformPrint = &printer; break; case NP_EMBED: printInfo.print.embedPrint.platformPrint = &printer; create_window_attributes(printInfo.print.embedPrint.window.ws_info); break; } g_NPP_Print(PLUGIN_INSTANCE_NPP(plugin), &printInfo); if (printer.fp) { long file_size = ftell(printer.fp); D(bug(" writeback data [%d bytes]\n", file_size)); rewind(printer.fp); if (file_size > 0) { NPPrintData printData; const int printDataMaxSize = sizeof(printData.data); int n = file_size / printDataMaxSize; while (--n >= 0) { printData.size = printDataMaxSize; if (fread(&printData.data, sizeof(printData.data), 1, printer.fp) != 1) { npw_printf("ERROR: unexpected end-of-file or error condition in NPP_Print\n"); break; } npw_plugin_instance_ref(plugin); invoke_NPN_PrintData(plugin, platform_print_id, &printData); npw_plugin_instance_unref(plugin); } printData.size = file_size % printDataMaxSize; if (fread(&printData.data, printData.size, 1, printer.fp) != 1) npw_printf("ERROR: unexpected end-of-file or error condition in NPP_Print\n"); npw_plugin_instance_ref(plugin); invoke_NPN_PrintData(plugin, platform_print_id, &printData); npw_plugin_instance_unref(plugin); } fclose(printer.fp); } if (printInfo.mode == NP_EMBED) { NPWindow *window = &printInfo.print.embedPrint.window; if (window->ws_info) { destroy_window_attributes(window->ws_info); window->ws_info = NULL; } } uint32_t plugin_printed = FALSE; if (printInfo.mode == NP_FULL) plugin_printed = printInfo.print.fullPrint.pluginPrinted; return rpc_method_send_reply(connection, RPC_TYPE_BOOLEAN, plugin_printed, RPC_TYPE_INVALID); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,670
static int handle_NPP_SetWindow(rpc_connection_t *connection) { D(bug("handle_NPP_SetWindow\n")); int error; PluginInstance *plugin; NPWindow *window; error = rpc_method_get_args(connection, RPC_TYPE_NPW_PLUGIN_INSTANCE, &plugin, RPC_TYPE_NP_WINDOW, &window, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPP_SetWindow() get args", error); return error; } NPError ret = g_NPP_SetWindow(PLUGIN_INSTANCE_NPP(plugin), window); if (window) { if (window->ws_info) { free(window->ws_info); window->ws_info = NULL; } free(window); } return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_INVALID); }
Bypass
0
static int handle_NPP_SetWindow(rpc_connection_t *connection) { D(bug("handle_NPP_SetWindow\n")); int error; PluginInstance *plugin; NPWindow *window; error = rpc_method_get_args(connection, RPC_TYPE_NPW_PLUGIN_INSTANCE, &plugin, RPC_TYPE_NP_WINDOW, &window, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPP_SetWindow() get args", error); return error; } NPError ret = g_NPP_SetWindow(PLUGIN_INSTANCE_NPP(plugin), window); if (window) { if (window->ws_info) { free(window->ws_info); window->ws_info = NULL; } free(window); } return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_INVALID); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,671
static int handle_NPP_StreamAsFile(rpc_connection_t *connection) { D(bug("handle_NPP_StreamAsFile\n")); PluginInstance *plugin; NPStream *stream; char *fname; int error = rpc_method_get_args(connection, RPC_TYPE_NPW_PLUGIN_INSTANCE, &plugin, RPC_TYPE_NP_STREAM, &stream, RPC_TYPE_STRING, &fname, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPP_StreamAsFile() get args", error); return error; } g_NPP_StreamAsFile(PLUGIN_INSTANCE_NPP(plugin), stream, fname); if (fname) free(fname); return rpc_method_send_reply (connection, RPC_TYPE_INVALID); }
Bypass
0
static int handle_NPP_StreamAsFile(rpc_connection_t *connection) { D(bug("handle_NPP_StreamAsFile\n")); PluginInstance *plugin; NPStream *stream; char *fname; int error = rpc_method_get_args(connection, RPC_TYPE_NPW_PLUGIN_INSTANCE, &plugin, RPC_TYPE_NP_STREAM, &stream, RPC_TYPE_STRING, &fname, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPP_StreamAsFile() get args", error); return error; } g_NPP_StreamAsFile(PLUGIN_INSTANCE_NPP(plugin), stream, fname); if (fname) free(fname); return rpc_method_send_reply (connection, RPC_TYPE_INVALID); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,672
static int handle_NPP_URLNotify(rpc_connection_t *connection) { D(bug("handle_NPP_URLNotify\n")); int error; PluginInstance *plugin; char *url; int32_t reason; void *notifyData; error = rpc_method_get_args(connection, RPC_TYPE_NPW_PLUGIN_INSTANCE, &plugin, RPC_TYPE_STRING, &url, RPC_TYPE_INT32, &reason, RPC_TYPE_NP_NOTIFY_DATA, &notifyData, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPP_URLNotify() get args", error); return error; } g_NPP_URLNotify(PLUGIN_INSTANCE_NPP(plugin), url, reason, notifyData); if (url) free(url); return rpc_method_send_reply (connection, RPC_TYPE_INVALID); }
Bypass
0
static int handle_NPP_URLNotify(rpc_connection_t *connection) { D(bug("handle_NPP_URLNotify\n")); int error; PluginInstance *plugin; char *url; int32_t reason; void *notifyData; error = rpc_method_get_args(connection, RPC_TYPE_NPW_PLUGIN_INSTANCE, &plugin, RPC_TYPE_STRING, &url, RPC_TYPE_INT32, &reason, RPC_TYPE_NP_NOTIFY_DATA, &notifyData, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPP_URLNotify() get args", error); return error; } g_NPP_URLNotify(PLUGIN_INSTANCE_NPP(plugin), url, reason, notifyData); if (url) free(url); return rpc_method_send_reply (connection, RPC_TYPE_INVALID); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,673
static int handle_NPP_Write(rpc_connection_t *connection) { D(bug("handle_NPP_Write\n")); PluginInstance *plugin; NPStream *stream; unsigned char *buf; int32_t offset, len; int error = rpc_method_get_args(connection, RPC_TYPE_NPW_PLUGIN_INSTANCE, &plugin, RPC_TYPE_NP_STREAM, &stream, RPC_TYPE_INT32, &offset, RPC_TYPE_ARRAY, RPC_TYPE_CHAR, &len, &buf, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPP_Write() get args", error); return error; } int32_t ret = g_NPP_Write(PLUGIN_INSTANCE_NPP(plugin), stream, offset, len, buf); if (buf) free(buf); return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_INVALID); }
Bypass
0
static int handle_NPP_Write(rpc_connection_t *connection) { D(bug("handle_NPP_Write\n")); PluginInstance *plugin; NPStream *stream; unsigned char *buf; int32_t offset, len; int error = rpc_method_get_args(connection, RPC_TYPE_NPW_PLUGIN_INSTANCE, &plugin, RPC_TYPE_NP_STREAM, &stream, RPC_TYPE_INT32, &offset, RPC_TYPE_ARRAY, RPC_TYPE_CHAR, &len, &buf, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPP_Write() get args", error); return error; } int32_t ret = g_NPP_Write(PLUGIN_INSTANCE_NPP(plugin), stream, offset, len, buf); if (buf) free(buf); return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_INVALID); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,674
static int handle_NPP_WriteReady(rpc_connection_t *connection) { D(bug("handle_NPP_WriteReady\n")); PluginInstance *plugin; NPStream *stream; int error = rpc_method_get_args(connection, RPC_TYPE_NPW_PLUGIN_INSTANCE, &plugin, RPC_TYPE_NP_STREAM, &stream, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPP_WriteReady() get args", error); return error; } int32_t ret = g_NPP_WriteReady(PLUGIN_INSTANCE_NPP(plugin), stream); return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_INVALID); }
Bypass
0
static int handle_NPP_WriteReady(rpc_connection_t *connection) { D(bug("handle_NPP_WriteReady\n")); PluginInstance *plugin; NPStream *stream; int error = rpc_method_get_args(connection, RPC_TYPE_NPW_PLUGIN_INSTANCE, &plugin, RPC_TYPE_NP_STREAM, &stream, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPP_WriteReady() get args", error); return error; } int32_t ret = g_NPP_WriteReady(PLUGIN_INSTANCE_NPP(plugin), stream); return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_INVALID); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,675
static int handle_NP_GetMIMEDescription(rpc_connection_t *connection) { D(bug("handle_NP_GetMIMEDescription\n")); int error = rpc_method_get_args(connection, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NP_GetMIMEDescription() get args", error); return error; } char *str = g_NP_GetMIMEDescription(); return rpc_method_send_reply(connection, RPC_TYPE_STRING, str, RPC_TYPE_INVALID); }
Bypass
0
static int handle_NP_GetMIMEDescription(rpc_connection_t *connection) { D(bug("handle_NP_GetMIMEDescription\n")); int error = rpc_method_get_args(connection, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NP_GetMIMEDescription() get args", error); return error; } char *str = g_NP_GetMIMEDescription(); return rpc_method_send_reply(connection, RPC_TYPE_STRING, str, RPC_TYPE_INVALID); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,676
static int handle_NP_GetValue(rpc_connection_t *connection) { D(bug("handle_NP_GetValue\n")); int32_t variable; int error = rpc_method_get_args(connection, RPC_TYPE_INT32, &variable, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NP_GetValue() get args", error); return error; } NPError ret = NPERR_GENERIC_ERROR; int variable_type = rpc_type_of_NPPVariable(variable); switch (variable_type) { case RPC_TYPE_STRING: { char *str = NULL; ret = g_NP_GetValue(variable, (void *)&str); return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_STRING, str, RPC_TYPE_INVALID); } case RPC_TYPE_INT32: { uint32_t n = 0; ret = g_NP_GetValue(variable, (void *)&n); return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_INT32, n, RPC_TYPE_INVALID); } case RPC_TYPE_BOOLEAN: { NPBool b = FALSE; ret = g_NP_GetValue(variable, (void *)&b); return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_BOOLEAN, b, RPC_TYPE_INVALID); } } npw_printf("ERROR: only basic types are supported in NP_GetValue()\n"); abort(); }
Bypass
0
static int handle_NP_GetValue(rpc_connection_t *connection) { D(bug("handle_NP_GetValue\n")); int32_t variable; int error = rpc_method_get_args(connection, RPC_TYPE_INT32, &variable, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NP_GetValue() get args", error); return error; } NPError ret = NPERR_GENERIC_ERROR; int variable_type = rpc_type_of_NPPVariable(variable); switch (variable_type) { case RPC_TYPE_STRING: { char *str = NULL; ret = g_NP_GetValue(variable, (void *)&str); return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_STRING, str, RPC_TYPE_INVALID); } case RPC_TYPE_INT32: { uint32_t n = 0; ret = g_NP_GetValue(variable, (void *)&n); return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_INT32, n, RPC_TYPE_INVALID); } case RPC_TYPE_BOOLEAN: { NPBool b = FALSE; ret = g_NP_GetValue(variable, (void *)&b); return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_BOOLEAN, b, RPC_TYPE_INVALID); } } npw_printf("ERROR: only basic types are supported in NP_GetValue()\n"); abort(); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,677
static int handle_NP_Initialize(rpc_connection_t *connection) { D(bug("handle_NP_Initialize\n")); uint32_t version; int error = rpc_method_get_args(connection, RPC_TYPE_UINT32, &version, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NP_Initialize() get args", error); return error; } NPError ret = g_NP_Initialize(version); return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_INVALID); }
Bypass
0
static int handle_NP_Initialize(rpc_connection_t *connection) { D(bug("handle_NP_Initialize\n")); uint32_t version; int error = rpc_method_get_args(connection, RPC_TYPE_UINT32, &version, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NP_Initialize() get args", error); return error; } NPError ret = g_NP_Initialize(version); return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_INVALID); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,678
invoke_NPN_CreateObject(PluginInstance *plugin) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), 0); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_CREATE_OBJECT, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_CreateObject() invoke", error); return 0; } uint32_t npobj_id = 0; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_UINT32, &npobj_id, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_CreateObject() wait for reply", error); return 0; } return npobj_id; }
Bypass
0
invoke_NPN_CreateObject(PluginInstance *plugin) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), 0); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_CREATE_OBJECT, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_CreateObject() invoke", error); return 0; } uint32_t npobj_id = 0; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_UINT32, &npobj_id, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_CreateObject() wait for reply", error); return 0; } return npobj_id; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,679
invoke_NPN_Evaluate(PluginInstance *plugin, NPObject *npobj, NPString *script, NPVariant *result) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), false); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_EVALUATE, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_NP_OBJECT, npobj, RPC_TYPE_NP_STRING, script, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_Evaluate() invoke", error); return false; } uint32_t ret; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_UINT32, &ret, RPC_TYPE_NP_VARIANT, result, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_Evaluate() wait for reply", error); return false; } return ret; }
Bypass
0
invoke_NPN_Evaluate(PluginInstance *plugin, NPObject *npobj, NPString *script, NPVariant *result) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), false); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_EVALUATE, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_NP_OBJECT, npobj, RPC_TYPE_NP_STRING, script, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_Evaluate() invoke", error); return false; } uint32_t ret; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_UINT32, &ret, RPC_TYPE_NP_VARIANT, result, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_Evaluate() wait for reply", error); return false; } return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,680
invoke_NPN_GetStringIdentifier(const NPUTF8 *name) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), NULL); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_GET_STRING_IDENTIFIER, RPC_TYPE_STRING, name, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_GetStringIdentifier() invoke", error); return NULL; } NPIdentifier ident; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_NP_IDENTIFIER, &ident, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_GetStringIdentifier() wait for reply", error); return NULL; } return ident; }
Bypass
0
invoke_NPN_GetStringIdentifier(const NPUTF8 *name) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), NULL); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_GET_STRING_IDENTIFIER, RPC_TYPE_STRING, name, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_GetStringIdentifier() invoke", error); return NULL; } NPIdentifier ident; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_NP_IDENTIFIER, &ident, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_GetStringIdentifier() wait for reply", error); return NULL; } return ident; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,681
invoke_NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, NPIdentifier *identifiers) { npw_return_if_fail(rpc_method_invoke_possible(g_rpc_connection)); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_GET_STRING_IDENTIFIERS, RPC_TYPE_ARRAY, RPC_TYPE_STRING, nameCount, names, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_GetStringIdentifiers() invoke", error); return; } uint32_t n_idents; NPIdentifier *idents; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_ARRAY, RPC_TYPE_NP_IDENTIFIER, &n_idents, &idents, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_GetStringIdentifiers() wait for reply", error); return; } if (identifiers) { if (n_idents != nameCount) { npw_printf("ERROR: NPN_GetStringIdentifiers returned fewer NPIdentifiers than expected\n"); if (n_idents > nameCount) n_idents = nameCount; } for (int i = 0; i < n_idents; i++) identifiers[i] = idents[i]; free(idents); } }
Bypass
0
invoke_NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, NPIdentifier *identifiers) { npw_return_if_fail(rpc_method_invoke_possible(g_rpc_connection)); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_GET_STRING_IDENTIFIERS, RPC_TYPE_ARRAY, RPC_TYPE_STRING, nameCount, names, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_GetStringIdentifiers() invoke", error); return; } uint32_t n_idents; NPIdentifier *idents; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_ARRAY, RPC_TYPE_NP_IDENTIFIER, &n_idents, &idents, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_GetStringIdentifiers() wait for reply", error); return; } if (identifiers) { if (n_idents != nameCount) { npw_printf("ERROR: NPN_GetStringIdentifiers returned fewer NPIdentifiers than expected\n"); if (n_idents > nameCount) n_idents = nameCount; } for (int i = 0; i < n_idents; i++) identifiers[i] = idents[i]; free(idents); } }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,682
invoke_NPN_GetURL(PluginInstance *plugin, const char *url, const char *target) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), NPERR_GENERIC_ERROR); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_GET_URL, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_STRING, url, RPC_TYPE_STRING, target, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_GetURL() invoke", error); return NPERR_GENERIC_ERROR; } int32_t ret; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INT32, &ret, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_GetURL() wait for reply", error); return NPERR_GENERIC_ERROR; } return ret; }
Bypass
0
invoke_NPN_GetURL(PluginInstance *plugin, const char *url, const char *target) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), NPERR_GENERIC_ERROR); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_GET_URL, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_STRING, url, RPC_TYPE_STRING, target, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_GetURL() invoke", error); return NPERR_GENERIC_ERROR; } int32_t ret; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INT32, &ret, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_GetURL() wait for reply", error); return NPERR_GENERIC_ERROR; } return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,683
invoke_NPN_GetValue(PluginInstance *plugin, NPNVariable variable, void *value) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), NPERR_GENERIC_ERROR); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_GET_VALUE, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_UINT32, variable, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_GetValue() invoke", error); return NPERR_GENERIC_ERROR; } int32_t ret; switch (rpc_type_of_NPNVariable(variable)) { case RPC_TYPE_UINT32: { uint32_t n = 0; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INT32, &ret, RPC_TYPE_UINT32, &n, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_GetValue() wait for reply", error); ret = NPERR_GENERIC_ERROR; } D(bug("-> value: %u\n", n)); *((unsigned int *)value) = n; break; } case RPC_TYPE_BOOLEAN: { uint32_t b = 0; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INT32, &ret, RPC_TYPE_BOOLEAN, &b, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_GetValue() wait for reply", error); ret = NPERR_GENERIC_ERROR; } D(bug("-> value: %s\n", b ? "true" : "false")); *((NPBool *)value) = b ? TRUE : FALSE; break; } case RPC_TYPE_NP_OBJECT: { NPObject *npobj = NULL; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INT32, &ret, RPC_TYPE_NP_OBJECT, &npobj, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_GetValue() wait for reply", error); ret = NPERR_GENERIC_ERROR; } D(bug("-> value: <object %p>\n", npobj)); *((NPObject **)value) = npobj; break; } } return ret; }
Bypass
0
invoke_NPN_GetValue(PluginInstance *plugin, NPNVariable variable, void *value) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), NPERR_GENERIC_ERROR); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_GET_VALUE, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_UINT32, variable, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_GetValue() invoke", error); return NPERR_GENERIC_ERROR; } int32_t ret; switch (rpc_type_of_NPNVariable(variable)) { case RPC_TYPE_UINT32: { uint32_t n = 0; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INT32, &ret, RPC_TYPE_UINT32, &n, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_GetValue() wait for reply", error); ret = NPERR_GENERIC_ERROR; } D(bug("-> value: %u\n", n)); *((unsigned int *)value) = n; break; } case RPC_TYPE_BOOLEAN: { uint32_t b = 0; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INT32, &ret, RPC_TYPE_BOOLEAN, &b, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_GetValue() wait for reply", error); ret = NPERR_GENERIC_ERROR; } D(bug("-> value: %s\n", b ? "true" : "false")); *((NPBool *)value) = b ? TRUE : FALSE; break; } case RPC_TYPE_NP_OBJECT: { NPObject *npobj = NULL; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INT32, &ret, RPC_TYPE_NP_OBJECT, &npobj, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_GetValue() wait for reply", error); ret = NPERR_GENERIC_ERROR; } D(bug("-> value: <object %p>\n", npobj)); *((NPObject **)value) = npobj; break; } } return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,684
invoke_NPN_HasMethod(PluginInstance *plugin, NPObject *npobj, NPIdentifier methodName) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), false); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_HAS_METHOD, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_NP_OBJECT, npobj, RPC_TYPE_NP_IDENTIFIER, &methodName, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_HasMethod() invoke", error); return false; } uint32_t ret; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_UINT32, &ret, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_HasMethod() wait for reply", error); return false; } return ret; }
Bypass
0
invoke_NPN_HasMethod(PluginInstance *plugin, NPObject *npobj, NPIdentifier methodName) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), false); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_HAS_METHOD, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_NP_OBJECT, npobj, RPC_TYPE_NP_IDENTIFIER, &methodName, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_HasMethod() invoke", error); return false; } uint32_t ret; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_UINT32, &ret, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_HasMethod() wait for reply", error); return false; } return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,685
invoke_NPN_HasProperty(PluginInstance *plugin, NPObject *npobj, NPIdentifier propertyName) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), false); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_HAS_PROPERTY, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_NP_OBJECT, npobj, RPC_TYPE_NP_IDENTIFIER, &propertyName, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_HasProperty() invoke", error); return false; } uint32_t ret; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_UINT32, &ret, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_HasProperty() wait for reply", error); return false; } return ret; }
Bypass
0
invoke_NPN_HasProperty(PluginInstance *plugin, NPObject *npobj, NPIdentifier propertyName) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), false); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_HAS_PROPERTY, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_NP_OBJECT, npobj, RPC_TYPE_NP_IDENTIFIER, &propertyName, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_HasProperty() invoke", error); return false; } uint32_t ret; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_UINT32, &ret, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_HasProperty() wait for reply", error); return false; } return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,686
invoke_NPN_IdentifierIsString(NPIdentifier identifier) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), false); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_IDENTIFIER_IS_STRING, RPC_TYPE_NP_IDENTIFIER, &identifier, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_IdentifierIsString() invoke", error); return false; } uint32_t ret; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_UINT32, &ret, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_IdentifierIsString() wait for reply", error); return false; } return ret; }
Bypass
0
invoke_NPN_IdentifierIsString(NPIdentifier identifier) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), false); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_IDENTIFIER_IS_STRING, RPC_TYPE_NP_IDENTIFIER, &identifier, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_IdentifierIsString() invoke", error); return false; } uint32_t ret; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_UINT32, &ret, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_IdentifierIsString() wait for reply", error); return false; } return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,687
invoke_NPN_InvalidateRect(PluginInstance *plugin, NPRect *invalidRect) { npw_return_if_fail(rpc_method_invoke_possible(g_rpc_connection)); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_INVALIDATE_RECT, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_NP_RECT, invalidRect, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_InvalidateRect() invoke", error); return; } error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_InvalidateRect() wait for reply", error); return; } }
Bypass
0
invoke_NPN_InvalidateRect(PluginInstance *plugin, NPRect *invalidRect) { npw_return_if_fail(rpc_method_invoke_possible(g_rpc_connection)); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_INVALIDATE_RECT, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_NP_RECT, invalidRect, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_InvalidateRect() invoke", error); return; } error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_InvalidateRect() wait for reply", error); return; } }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,688
invoke_NPN_InvokeDefault(PluginInstance *plugin, NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), false); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_INVOKE_DEFAULT, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_NP_OBJECT, npobj, RPC_TYPE_ARRAY, RPC_TYPE_NP_VARIANT, argCount, args, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_InvokeDefault() invoke", error); return false; } uint32_t ret; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_UINT32, &ret, RPC_TYPE_NP_VARIANT, result, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_InvokeDefault() wait for reply", error); return false; } return ret; }
Bypass
0
invoke_NPN_InvokeDefault(PluginInstance *plugin, NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), false); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_INVOKE_DEFAULT, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_NP_OBJECT, npobj, RPC_TYPE_ARRAY, RPC_TYPE_NP_VARIANT, argCount, args, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_InvokeDefault() invoke", error); return false; } uint32_t ret; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_UINT32, &ret, RPC_TYPE_NP_VARIANT, result, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_InvokeDefault() wait for reply", error); return false; } return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,689
invoke_NPN_NewStream(PluginInstance *plugin, NPMIMEType type, const char *target, NPStream **pstream) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), NPERR_GENERIC_ERROR); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_NEW_STREAM, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_STRING, type, RPC_TYPE_STRING, target, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_NewStream() invoke", error); return NPERR_OUT_OF_MEMORY_ERROR; } int32_t ret; uint32_t stream_id; char *url; uint32_t end; uint32_t lastmodified; void *notifyData; char *headers; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INT32, &ret, RPC_TYPE_UINT32, &stream_id, RPC_TYPE_STRING, &url, RPC_TYPE_UINT32, &end, RPC_TYPE_UINT32, &lastmodified, RPC_TYPE_NP_NOTIFY_DATA, &notifyData, RPC_TYPE_STRING, &headers, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_NewStream() wait for reply", error); return NPERR_GENERIC_ERROR; } NPStream *stream = NULL; if (ret == NPERR_NO_ERROR) { if ((stream = malloc(sizeof(*stream))) == NULL) return NPERR_OUT_OF_MEMORY_ERROR; memset(stream, 0, sizeof(*stream)); StreamInstance *stream_ndata; if ((stream_ndata = malloc(sizeof(*stream_ndata))) == NULL) { free(stream); return NPERR_OUT_OF_MEMORY_ERROR; } stream->ndata = stream_ndata; stream->url = url; stream->end = end; stream->lastmodified = lastmodified; stream->notifyData = notifyData; stream->headers = headers; memset(stream_ndata, 0, sizeof(*stream_ndata)); stream_ndata->stream_id = stream_id; id_link(stream_id, stream_ndata); stream_ndata->stream = stream; stream_ndata->is_plugin_stream = 1; } else { if (url) free(url); if (headers) free(headers); } *pstream = stream; return ret; }
Bypass
0
invoke_NPN_NewStream(PluginInstance *plugin, NPMIMEType type, const char *target, NPStream **pstream) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), NPERR_GENERIC_ERROR); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_NEW_STREAM, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_STRING, type, RPC_TYPE_STRING, target, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_NewStream() invoke", error); return NPERR_OUT_OF_MEMORY_ERROR; } int32_t ret; uint32_t stream_id; char *url; uint32_t end; uint32_t lastmodified; void *notifyData; char *headers; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INT32, &ret, RPC_TYPE_UINT32, &stream_id, RPC_TYPE_STRING, &url, RPC_TYPE_UINT32, &end, RPC_TYPE_UINT32, &lastmodified, RPC_TYPE_NP_NOTIFY_DATA, &notifyData, RPC_TYPE_STRING, &headers, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_NewStream() wait for reply", error); return NPERR_GENERIC_ERROR; } NPStream *stream = NULL; if (ret == NPERR_NO_ERROR) { if ((stream = malloc(sizeof(*stream))) == NULL) return NPERR_OUT_OF_MEMORY_ERROR; memset(stream, 0, sizeof(*stream)); StreamInstance *stream_ndata; if ((stream_ndata = malloc(sizeof(*stream_ndata))) == NULL) { free(stream); return NPERR_OUT_OF_MEMORY_ERROR; } stream->ndata = stream_ndata; stream->url = url; stream->end = end; stream->lastmodified = lastmodified; stream->notifyData = notifyData; stream->headers = headers; memset(stream_ndata, 0, sizeof(*stream_ndata)); stream_ndata->stream_id = stream_id; id_link(stream_id, stream_ndata); stream_ndata->stream = stream; stream_ndata->is_plugin_stream = 1; } else { if (url) free(url); if (headers) free(headers); } *pstream = stream; return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,690
invoke_NPN_PopPopupsEnabledState(PluginInstance *plugin) { npw_return_if_fail(rpc_method_invoke_possible(g_rpc_connection)); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_POP_POPUPS_ENABLED_STATE, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_PopPopupsEnabledState() invoke", error); return; } error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) npw_perror("NPN_PopPopupsEnabledState() wait for reply", error); }
Bypass
0
invoke_NPN_PopPopupsEnabledState(PluginInstance *plugin) { npw_return_if_fail(rpc_method_invoke_possible(g_rpc_connection)); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_POP_POPUPS_ENABLED_STATE, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_PopPopupsEnabledState() invoke", error); return; } error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) npw_perror("NPN_PopPopupsEnabledState() wait for reply", error); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,691
invoke_NPN_PostURL(PluginInstance *plugin, const char *url, const char *target, uint32_t len, const char *buf, NPBool file) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), NPERR_GENERIC_ERROR); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_POST_URL, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_STRING, url, RPC_TYPE_STRING, target, RPC_TYPE_ARRAY, RPC_TYPE_CHAR, len, buf, RPC_TYPE_BOOLEAN, file, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_PostURL() invoke", error); return NPERR_GENERIC_ERROR; } int32_t ret; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INT32, &ret, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_PostURL() wait for reply", error); return NPERR_GENERIC_ERROR; } return ret; }
Bypass
0
invoke_NPN_PostURL(PluginInstance *plugin, const char *url, const char *target, uint32_t len, const char *buf, NPBool file) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), NPERR_GENERIC_ERROR); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_POST_URL, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_STRING, url, RPC_TYPE_STRING, target, RPC_TYPE_ARRAY, RPC_TYPE_CHAR, len, buf, RPC_TYPE_BOOLEAN, file, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_PostURL() invoke", error); return NPERR_GENERIC_ERROR; } int32_t ret; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INT32, &ret, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_PostURL() wait for reply", error); return NPERR_GENERIC_ERROR; } return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,692
invoke_NPN_PostURLNotify(PluginInstance *plugin, const char *url, const char *target, uint32_t len, const char *buf, NPBool file, void *notifyData) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), NPERR_GENERIC_ERROR); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_POST_URL_NOTIFY, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_STRING, url, RPC_TYPE_STRING, target, RPC_TYPE_ARRAY, RPC_TYPE_CHAR, len, buf, RPC_TYPE_BOOLEAN, file, RPC_TYPE_NP_NOTIFY_DATA, notifyData, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_PostURLNotify() invoke", error); return NPERR_GENERIC_ERROR; } int32_t ret; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INT32, &ret, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_PostURLNotify() wait for reply", error); return NPERR_GENERIC_ERROR; } return ret; }
Bypass
0
invoke_NPN_PostURLNotify(PluginInstance *plugin, const char *url, const char *target, uint32_t len, const char *buf, NPBool file, void *notifyData) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), NPERR_GENERIC_ERROR); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_POST_URL_NOTIFY, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_STRING, url, RPC_TYPE_STRING, target, RPC_TYPE_ARRAY, RPC_TYPE_CHAR, len, buf, RPC_TYPE_BOOLEAN, file, RPC_TYPE_NP_NOTIFY_DATA, notifyData, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_PostURLNotify() invoke", error); return NPERR_GENERIC_ERROR; } int32_t ret; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INT32, &ret, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_PostURLNotify() wait for reply", error); return NPERR_GENERIC_ERROR; } return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,693
invoke_NPN_PrintData(PluginInstance *plugin, uint32_t platform_print_id, NPPrintData *printData) { if (printData == NULL) return; npw_return_if_fail(rpc_method_invoke_possible(g_rpc_connection)); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_PRINT_DATA, RPC_TYPE_UINT32, platform_print_id, RPC_TYPE_NP_PRINT_DATA, printData, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_PrintData() invoke", error); return; } error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_PrintData() wait for reply", error); return; } }
Bypass
0
invoke_NPN_PrintData(PluginInstance *plugin, uint32_t platform_print_id, NPPrintData *printData) { if (printData == NULL) return; npw_return_if_fail(rpc_method_invoke_possible(g_rpc_connection)); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_PRINT_DATA, RPC_TYPE_UINT32, platform_print_id, RPC_TYPE_NP_PRINT_DATA, printData, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_PrintData() invoke", error); return; } error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_PrintData() wait for reply", error); return; } }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,694
invoke_NPN_PushPopupsEnabledState(PluginInstance *plugin, NPBool enabled) { npw_return_if_fail(rpc_method_invoke_possible(g_rpc_connection)); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_PUSH_POPUPS_ENABLED_STATE, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_UINT32, (uint32_t)enabled, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_PushPopupsEnabledState() invoke", error); return; } error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) npw_perror("NPN_PushPopupsEnabledState() wait for reply", error); }
Bypass
0
invoke_NPN_PushPopupsEnabledState(PluginInstance *plugin, NPBool enabled) { npw_return_if_fail(rpc_method_invoke_possible(g_rpc_connection)); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_PUSH_POPUPS_ENABLED_STATE, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_UINT32, (uint32_t)enabled, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_PushPopupsEnabledState() invoke", error); return; } error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) npw_perror("NPN_PushPopupsEnabledState() wait for reply", error); }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,695
invoke_NPN_ReleaseObject(NPObject *npobj) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), npobj->referenceCount); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_RELEASE_OBJECT, RPC_TYPE_NP_OBJECT, npobj, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_ReleaseObject() invoke", error); return npobj->referenceCount; } uint32_t refcount; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_UINT32, &refcount, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_ReleaseObject() wait for reply", error); return npobj->referenceCount; } return refcount; }
Bypass
0
invoke_NPN_ReleaseObject(NPObject *npobj) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), npobj->referenceCount); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_RELEASE_OBJECT, RPC_TYPE_NP_OBJECT, npobj, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_ReleaseObject() invoke", error); return npobj->referenceCount; } uint32_t refcount; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_UINT32, &refcount, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_ReleaseObject() wait for reply", error); return npobj->referenceCount; } return refcount; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,696
invoke_NPN_RemoveProperty(PluginInstance *plugin, NPObject *npobj, NPIdentifier propertyName) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), false); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_REMOVE_PROPERTY, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_NP_OBJECT, npobj, RPC_TYPE_NP_IDENTIFIER, &propertyName, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_RemoveProperty() invoke", error); return false; } uint32_t ret; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_UINT32, &ret, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_RemoveProperty() wait for reply", error); return false; } return ret; }
Bypass
0
invoke_NPN_RemoveProperty(PluginInstance *plugin, NPObject *npobj, NPIdentifier propertyName) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), false); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_REMOVE_PROPERTY, RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, RPC_TYPE_NP_OBJECT, npobj, RPC_TYPE_NP_IDENTIFIER, &propertyName, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_RemoveProperty() invoke", error); return false; } uint32_t ret; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_UINT32, &ret, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_RemoveProperty() wait for reply", error); return false; } return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,697
invoke_NPN_RequestRead(NPStream *stream, NPByteRange *rangeList) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), NPERR_GENERIC_ERROR); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_REQUEST_READ, RPC_TYPE_NP_STREAM, stream, RPC_TYPE_NP_BYTE_RANGE, rangeList, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_RequestRead() invoke", error); return NPERR_GENERIC_ERROR; } int32_t ret; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INT32, &ret, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_RequestRead() wait for reply", error); return NPERR_GENERIC_ERROR; } return ret; }
Bypass
0
invoke_NPN_RequestRead(NPStream *stream, NPByteRange *rangeList) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), NPERR_GENERIC_ERROR); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_REQUEST_READ, RPC_TYPE_NP_STREAM, stream, RPC_TYPE_NP_BYTE_RANGE, rangeList, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_RequestRead() invoke", error); return NPERR_GENERIC_ERROR; } int32_t ret; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INT32, &ret, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_RequestRead() wait for reply", error); return NPERR_GENERIC_ERROR; } return ret; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,698
invoke_NPN_RetainObject(NPObject *npobj) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), npobj->referenceCount); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_RETAIN_OBJECT, RPC_TYPE_NP_OBJECT, npobj, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_RetainObject() invoke", error); return npobj->referenceCount; } uint32_t refcount; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_UINT32, &refcount, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_RetainObject() wait for reply", error); return npobj->referenceCount; } return refcount; }
Bypass
0
invoke_NPN_RetainObject(NPObject *npobj) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), npobj->referenceCount); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_RETAIN_OBJECT, RPC_TYPE_NP_OBJECT, npobj, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_RetainObject() invoke", error); return npobj->referenceCount; } uint32_t refcount; error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_UINT32, &refcount, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_RetainObject() wait for reply", error); return npobj->referenceCount; } return refcount; }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null
21,699
invoke_NPN_SetException(NPObject *npobj, const NPUTF8 *message) { npw_return_if_fail(rpc_method_invoke_possible(g_rpc_connection)); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_SET_EXCEPTION, RPC_TYPE_NP_OBJECT, npobj, RPC_TYPE_STRING, message, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_SetException() invoke", error); return; } error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_SetException() wait for reply", error); return; } }
Bypass
0
invoke_NPN_SetException(NPObject *npobj, const NPUTF8 *message) { npw_return_if_fail(rpc_method_invoke_possible(g_rpc_connection)); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_SET_EXCEPTION, RPC_TYPE_NP_OBJECT, npobj, RPC_TYPE_STRING, message, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_SetException() invoke", error); return; } error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPN_SetException() wait for reply", error); return; } }
@@ -1302,6 +1302,8 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: + case NPNVprivateModeBool: + case NPNVsupportsAdvancedKeyHandling: return g_NPN_GetValue_real(instance, variable, value); default: switch (variable & 0xff) {
CWE-264
null
null