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,700 | invoke_NPN_SetProperty(PluginInstance *plugin, NPObject *npobj, NPIdentifier propertyName,
const NPVariant *value)
{
npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), false);
int error = rpc_method_invoke(g_rpc_connection,
RPC_METHOD_NPN_SET_PROPERTY,
RPC_TYPE_NPW_PLUGIN_... | Bypass | 0 | invoke_NPN_SetProperty(PluginInstance *plugin, NPObject *npobj, NPIdentifier propertyName,
const NPVariant *value)
{
npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), false);
int error = rpc_method_invoke(g_rpc_connection,
RPC_METHOD_NPN_SET_PROPERTY,
RPC_TYPE_NPW_PLUGIN_... | @@ -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:
... | CWE-264 | null | null |
21,701 | invoke_NPN_SetValue(PluginInstance *plugin, NPPVariable variable, void *value)
{
switch (rpc_type_of_NPPVariable(variable)) {
case RPC_TYPE_BOOLEAN:
break;
default:
D(bug("WARNING: unhandled variable %d in NPN_SetValue()\n", variable));
return NPERR_INVALID_PARAM;
}
npw_return_val_if_fail(rpc_method_invok... | Bypass | 0 | invoke_NPN_SetValue(PluginInstance *plugin, NPPVariable variable, void *value)
{
switch (rpc_type_of_NPPVariable(variable)) {
case RPC_TYPE_BOOLEAN:
break;
default:
D(bug("WARNING: unhandled variable %d in NPN_SetValue()\n", variable));
return NPERR_INVALID_PARAM;
}
npw_return_val_if_fail(rpc_method_invok... | @@ -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:
... | CWE-264 | null | null |
21,702 | invoke_NPN_Status(PluginInstance *plugin, const char *message)
{
npw_return_if_fail(rpc_method_invoke_possible(g_rpc_connection));
int error = rpc_method_invoke(g_rpc_connection,
RPC_METHOD_NPN_STATUS,
RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin,
RPC_TYPE_STRING, message,
RPC_TYPE_INVALID)... | Bypass | 0 | invoke_NPN_Status(PluginInstance *plugin, const char *message)
{
npw_return_if_fail(rpc_method_invoke_possible(g_rpc_connection));
int error = rpc_method_invoke(g_rpc_connection,
RPC_METHOD_NPN_STATUS,
RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin,
RPC_TYPE_STRING, message,
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:
... | CWE-264 | null | null |
21,703 | invoke_NPN_UTF8FromIdentifier(NPIdentifier identifier)
{
npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), NULL);
int error = rpc_method_invoke(g_rpc_connection,
RPC_METHOD_NPN_UTF8_FROM_IDENTIFIER,
RPC_TYPE_NP_IDENTIFIER, &identifier,
RPC_TYPE_INVALID);
if (error != R... | Bypass | 0 | invoke_NPN_UTF8FromIdentifier(NPIdentifier identifier)
{
npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), NULL);
int error = rpc_method_invoke(g_rpc_connection,
RPC_METHOD_NPN_UTF8_FROM_IDENTIFIER,
RPC_TYPE_NP_IDENTIFIER, &identifier,
RPC_TYPE_INVALID);
if (error != R... | @@ -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:
... | CWE-264 | null | null |
21,704 | invoke_NPN_UserAgent(void)
{
npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), NULL);
int error = rpc_method_invoke(g_rpc_connection,
RPC_METHOD_NPN_USER_AGENT,
RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPN_UserAgent() invoke", error);
return NULL;
... | Bypass | 0 | invoke_NPN_UserAgent(void)
{
npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), NULL);
int error = rpc_method_invoke(g_rpc_connection,
RPC_METHOD_NPN_USER_AGENT,
RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPN_UserAgent() invoke", error);
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:
... | CWE-264 | null | null |
21,705 | invoke_NPN_Write(PluginInstance *plugin, NPStream *stream, int32_t len, void *buf)
{
npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), -1);
int error = rpc_method_invoke(g_rpc_connection,
RPC_METHOD_NPN_WRITE,
RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin,
RPC_TYPE_NP_STREAM, stre... | Bypass | 0 | invoke_NPN_Write(PluginInstance *plugin, NPStream *stream, int32_t len, void *buf)
{
npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), -1);
int error = rpc_method_invoke(g_rpc_connection,
RPC_METHOD_NPN_WRITE,
RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin,
RPC_TYPE_NP_STREAM, stre... | @@ -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:
... | CWE-264 | null | null |
21,706 | static inline bool is_thread_check_enabled(void)
{
static int thread_check = -1;
if (thread_check < 0)
thread_check = is_thread_check_enabled_1();
return thread_check;
}
| Bypass | 0 | static inline bool is_thread_check_enabled(void)
{
static int thread_check = -1;
if (thread_check < 0)
thread_check = is_thread_check_enabled_1();
return thread_check;
}
| @@ -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:
... | CWE-264 | null | null |
21,707 | static bool is_thread_check_enabled_1(void)
{
const char *thread_check_str;
if ((thread_check_str = getenv("NPW_THREAD_CHECK")) != NULL)
return ((strcmp(thread_check_str, "yes") == 0) ||
(strcmp(thread_check_str, "1") == 0));
/* enable main-thread checks by default for all builds from snapshots */
retu... | Bypass | 0 | static bool is_thread_check_enabled_1(void)
{
const char *thread_check_str;
if ((thread_check_str = getenv("NPW_THREAD_CHECK")) != NULL)
return ((strcmp(thread_check_str, "yes") == 0) ||
(strcmp(thread_check_str, "1") == 0));
/* enable main-thread checks by default for all builds from snapshots */
retu... | @@ -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:
... | CWE-264 | null | null |
21,708 | int main(int argc, char **argv)
{
const char *plugin_path = NULL;
const char *connection_path = NULL;
enum {
CMD_RUN,
CMD_TEST,
CMD_INFO,
CMD_HELP
};
int cmd = CMD_RUN;
for (int i = 0; i < argc; i++) {
const char *arg = argv[i];
if (strcmp(arg, "-h") == 0 || strcmp(arg, "--help") == 0) {
argv[i] ... | Bypass | 0 | int main(int argc, char **argv)
{
const char *plugin_path = NULL;
const char *connection_path = NULL;
enum {
CMD_RUN,
CMD_TEST,
CMD_INFO,
CMD_HELP
};
int cmd = CMD_RUN;
for (int i = 0; i < argc; i++) {
const char *arg = argv[i];
if (strcmp(arg, "-h") == 0 || strcmp(arg, "--help") == 0) {
argv[i] ... | @@ -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:
... | CWE-264 | null | null |
21,709 | static void npidentifier_cache_add_int(NPIdentifier ident, int32_t value)
{
if (G_UNLIKELY(g_npidentifier_cache == NULL))
return;
NPIdentifierInfo *npi = npidentifier_info_new();
if (G_UNLIKELY(npi == NULL))
return;
npi->string_len = 0;
npi->u.value = value;
g_hash_table_insert(g_npidentifier_cache, ident... | Bypass | 0 | static void npidentifier_cache_add_int(NPIdentifier ident, int32_t value)
{
if (G_UNLIKELY(g_npidentifier_cache == NULL))
return;
NPIdentifierInfo *npi = npidentifier_info_new();
if (G_UNLIKELY(npi == NULL))
return;
npi->string_len = 0;
npi->u.value = value;
g_hash_table_insert(g_npidentifier_cache, 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:
... | CWE-264 | null | null |
21,710 | static inline void npidentifier_cache_create(void)
{
g_npidentifier_cache =
g_hash_table_new_full(NULL, NULL, NULL,
(GDestroyNotify)npidentifier_info_destroy);
}
| Bypass | 0 | static inline void npidentifier_cache_create(void)
{
g_npidentifier_cache =
g_hash_table_new_full(NULL, NULL, NULL,
(GDestroyNotify)npidentifier_info_destroy);
}
| @@ -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:
... | CWE-264 | null | null |
21,711 | static inline void npidentifier_cache_destroy(void)
{
if (g_npidentifier_cache) {
g_hash_table_destroy(g_npidentifier_cache);
g_npidentifier_cache = NULL;
}
}
| Bypass | 0 | static inline void npidentifier_cache_destroy(void)
{
if (g_npidentifier_cache) {
g_hash_table_destroy(g_npidentifier_cache);
g_npidentifier_cache = 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:
... | CWE-264 | null | null |
21,712 | static inline bool npidentifier_cache_find(NPIdentifierFindArgs *args, NPIdentifier *pident)
{
args->ident = NULL;
#if defined(HAVE_G_HASH_TABLE_FIND) && !defined(BUILD_GENERIC)
if (!g_hash_table_find(g_npidentifier_cache, npidentifier_cache_find_info, args))
return false;
#else
g_hash_table_foreach(g_npidentifi... | Bypass | 0 | static inline bool npidentifier_cache_find(NPIdentifierFindArgs *args, NPIdentifier *pident)
{
args->ident = NULL;
#if defined(HAVE_G_HASH_TABLE_FIND) && !defined(BUILD_GENERIC)
if (!g_hash_table_find(g_npidentifier_cache, npidentifier_cache_find_info, args))
return false;
#else
g_hash_table_foreach(g_npidentifi... | @@ -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:
... | CWE-264 | null | null |
21,713 | static gboolean npidentifier_cache_find_info(gpointer key, gpointer value, gpointer user_data)
{
NPIdentifier *ident = (NPIdentifier)key;
NPIdentifierInfo *npi = (NPIdentifierInfo *)value;
NPIdentifierFindArgs *args = (NPIdentifierFindArgs *)user_data;
#if !defined(HAVE_G_HASH_TABLE_FIND) || defined(BUILD_GENERIC... | Bypass | 0 | static gboolean npidentifier_cache_find_info(gpointer key, gpointer value, gpointer user_data)
{
NPIdentifier *ident = (NPIdentifier)key;
NPIdentifierInfo *npi = (NPIdentifierInfo *)value;
NPIdentifierFindArgs *args = (NPIdentifierFindArgs *)user_data;
#if !defined(HAVE_G_HASH_TABLE_FIND) || defined(BUILD_GENERIC... | @@ -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:
... | CWE-264 | null | null |
21,714 | static inline bool npidentifier_cache_has_string(const gchar *str, NPIdentifier *pident)
{
if (G_UNLIKELY(g_npidentifier_cache == NULL))
return false;
NPIdentifierFindArgs args;
args.info.string_len = strlen(str) + 1;
args.info.u.string = (gchar *)str;
return npidentifier_cache_find(&args, pident);
}
| Bypass | 0 | static inline bool npidentifier_cache_has_string(const gchar *str, NPIdentifier *pident)
{
if (G_UNLIKELY(g_npidentifier_cache == NULL))
return false;
NPIdentifierFindArgs args;
args.info.string_len = strlen(str) + 1;
args.info.u.string = (gchar *)str;
return npidentifier_cache_find(&args, pident);
}
| @@ -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:
... | CWE-264 | null | null |
21,715 | static inline NPIdentifierInfo *npidentifier_cache_lookup(NPIdentifier ident)
{
if (G_UNLIKELY(g_npidentifier_cache == NULL))
return NULL;
return g_hash_table_lookup(g_npidentifier_cache, ident);
}
| Bypass | 0 | static inline NPIdentifierInfo *npidentifier_cache_lookup(NPIdentifier ident)
{
if (G_UNLIKELY(g_npidentifier_cache == NULL))
return NULL;
return g_hash_table_lookup(g_npidentifier_cache, 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:
... | CWE-264 | null | null |
21,716 | static void npidentifier_cache_reserve(int n_entries)
{
if (G_UNLIKELY(g_npidentifier_cache == NULL))
npidentifier_cache_create();
if (g_hash_table_size(g_npidentifier_cache) + n_entries > NPIDENTIFIER_CACHE_SIZE)
npidentifier_cache_invalidate();
}
| Bypass | 0 | static void npidentifier_cache_reserve(int n_entries)
{
if (G_UNLIKELY(g_npidentifier_cache == NULL))
npidentifier_cache_create();
if (g_hash_table_size(g_npidentifier_cache) + n_entries > NPIDENTIFIER_CACHE_SIZE)
npidentifier_cache_invalidate();
}
| @@ -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:
... | CWE-264 | null | null |
21,717 | static inline void npidentifier_info_destroy(NPIdentifierInfo *npi)
{
if (G_UNLIKELY(npi == NULL))
return;
if (npi->string_len > 0) {
NPW_MemFree(npi->u.string);
npi->u.string = NULL;
}
NPW_MemFree(npi);
}
| Bypass | 0 | static inline void npidentifier_info_destroy(NPIdentifierInfo *npi)
{
if (G_UNLIKELY(npi == NULL))
return;
if (npi->string_len > 0) {
NPW_MemFree(npi->u.string);
npi->u.string = NULL;
}
NPW_MemFree(npi);
}
| @@ -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:
... | CWE-264 | null | null |
21,718 | static void plugin_instance_deallocate(PluginInstance *plugin)
{
NPW_MemFree(plugin);
}
| Bypass | 0 | static void plugin_instance_deallocate(PluginInstance *plugin)
{
NPW_MemFree(plugin);
}
| @@ -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:
... | CWE-264 | null | null |
21,719 | static void plugin_instance_finalize(PluginInstance *plugin)
{
if (plugin->browser_toplevel) {
g_object_unref(plugin->browser_toplevel);
plugin->browser_toplevel = NULL;
}
if (plugin->instance) {
free(plugin->instance);
plugin->instance = NULL;
}
}
| Bypass | 0 | static void plugin_instance_finalize(PluginInstance *plugin)
{
if (plugin->browser_toplevel) {
g_object_unref(plugin->browser_toplevel);
plugin->browser_toplevel = NULL;
}
if (plugin->instance) {
free(plugin->instance);
plugin->instance = 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:
... | CWE-264 | null | null |
21,720 | static void plugin_instance_invalidate(PluginInstance *plugin)
{
destroy_window(plugin);
/* NPP instance is no longer valid beyond this point. Drop the link
to the PluginInstance now so that future RPC with this
PluginInstance will actually emit a NULL instance, which the
other side will deal as a no-op for ... | Bypass | 0 | static void plugin_instance_invalidate(PluginInstance *plugin)
{
destroy_window(plugin);
/* NPP instance is no longer valid beyond this point. Drop the link
to the PluginInstance now so that future RPC with this
PluginInstance will actually emit a NULL instance, which the
other side will deal as a no-op for ... | @@ -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:
... | CWE-264 | null | null |
21,721 | static void rpc_error_callback_cb(rpc_connection_t *connection, void *user_data)
{
D(bug("RPC connection %p is in a bad state, closing the plugin\n",connection));
rpc_connection_set_error_callback(connection, NULL, NULL);
gtk_main_quit();
}
| Bypass | 0 | static void rpc_error_callback_cb(rpc_connection_t *connection, void *user_data)
{
D(bug("RPC connection %p is in a bad state, closing the plugin\n",connection));
rpc_connection_set_error_callback(connection, NULL, NULL);
gtk_main_quit();
}
| @@ -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:
... | CWE-264 | null | null |
21,722 | static gboolean rpc_event_check(GSource *source)
{
return rpc_wait_dispatch(g_rpc_connection, 0) > 0;
}
| Bypass | 0 | static gboolean rpc_event_check(GSource *source)
{
return rpc_wait_dispatch(g_rpc_connection, 0) > 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:
... | CWE-264 | null | null |
21,723 | static gboolean rpc_event_dispatch(GSource *source, GSourceFunc callback, gpointer connection)
{
return rpc_dispatch(connection) != RPC_ERROR_CONNECTION_CLOSED;
}
| Bypass | 0 | static gboolean rpc_event_dispatch(GSource *source, GSourceFunc callback, gpointer connection)
{
return rpc_dispatch(connection) != RPC_ERROR_CONNECTION_CLOSED;
}
| @@ -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:
... | CWE-264 | null | null |
21,724 | static gboolean rpc_event_prepare(GSource *source, gint *timeout)
{
*timeout = -1;
return FALSE;
}
| Bypass | 0 | static gboolean rpc_event_prepare(GSource *source, gint *timeout)
{
*timeout = -1;
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:
... | CWE-264 | null | null |
21,725 | static void send_xembed_message(Display *display,
Window window,
long message,
long detail,
long data1,
long data2)
{
XEvent xevent;
memset(&xevent, 0, sizeof(xevent));
xevent.xclient.window = window;
xevent.xclient.type = ClientMessage;
xevent.xclient... | Bypass | 0 | static void send_xembed_message(Display *display,
Window window,
long message,
long detail,
long data1,
long data2)
{
XEvent xevent;
memset(&xevent, 0, sizeof(xevent));
xevent.xclient.window = window;
xevent.xclient.type = ClientMessage;
xevent.xclient... | @@ -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:
... | CWE-264 | null | null |
21,726 | bool thread_check(void)
{
#ifdef ENABLE_THREAD_CHECK
if (is_thread_check_enabled())
return (g_main_thread == pthread_self());
#endif
return true;
}
| Bypass | 0 | bool thread_check(void)
{
#ifdef ENABLE_THREAD_CHECK
if (is_thread_check_enabled())
return (g_main_thread == pthread_self());
#endif
return true;
}
| @@ -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:
... | CWE-264 | null | null |
21,727 | static void thread_check_init(void)
{
g_main_thread = pthread_self();
}
| Bypass | 0 | static void thread_check_init(void)
{
g_main_thread = pthread_self();
}
| @@ -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:
... | CWE-264 | null | null |
21,728 | static void trap_errors(void)
{
trapped_error_code = 0;
old_error_handler = XSetErrorHandler(error_handler);
}
| Bypass | 0 | static void trap_errors(void)
{
trapped_error_code = 0;
old_error_handler = XSetErrorHandler(error_handler);
}
| @@ -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:
... | CWE-264 | null | null |
21,729 | static int untrap_errors(void)
{
XSetErrorHandler(old_error_handler);
return trapped_error_code;
}
| Bypass | 0 | static int untrap_errors(void)
{
XSetErrorHandler(old_error_handler);
return trapped_error_code;
}
| @@ -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:
... | CWE-264 | null | null |
21,730 | static int update_window(PluginInstance *plugin, NPWindow *window)
{
if (plugin->is_windowless) {
npw_printf("ERROR: update_window() called for windowless plugin\n");
return -1;
}
if (window->ws_info == NULL) {
npw_printf("ERROR: no window attributes for window %p\n", window->window);
return -1;
}
NPSet... | Bypass | 0 | static int update_window(PluginInstance *plugin, NPWindow *window)
{
if (plugin->is_windowless) {
npw_printf("ERROR: update_window() called for windowless plugin\n");
return -1;
}
if (window->ws_info == NULL) {
npw_printf("ERROR: no window attributes for window %p\n", window->window);
return -1;
}
NPSet... | @@ -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:
... | CWE-264 | null | null |
21,731 | static inline bool use_npidentifier_cache(void)
{
return USE_NPIDENTIFIER_CACHE && npruntime_use_cache();
}
| Bypass | 0 | static inline bool use_npidentifier_cache(void)
{
return USE_NPIDENTIFIER_CACHE && npruntime_use_cache();
}
| @@ -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:
... | CWE-264 | null | null |
21,732 | static void xt_client_set_info(Widget w, unsigned long flags)
{
Atom atom_XEMBED_INFO = XInternAtom(x_display, "_XEMBED_INFO", False);
unsigned long buffer[2];
buffer[1] = 0; /* Protocol version */
buffer[1] = flags;
XChangeProperty(XtDisplay(w), XtWindow(w),
atom_XEMBED_INFO,
atom_XEMBED_INFO,
... | Bypass | 0 | static void xt_client_set_info(Widget w, unsigned long flags)
{
Atom atom_XEMBED_INFO = XInternAtom(x_display, "_XEMBED_INFO", False);
unsigned long buffer[2];
buffer[1] = 0; /* Protocol version */
buffer[1] = flags;
XChangeProperty(XtDisplay(w), XtWindow(w),
atom_XEMBED_INFO,
atom_XEMBED_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:
... | CWE-264 | null | null |
21,733 | static void xt_client_simulate_focus(Widget w, int type)
{
XEvent xevent;
memset(&xevent, 0, sizeof(xevent));
xevent.xfocus.type = type;
xevent.xfocus.window = XtWindow(w);
xevent.xfocus.display = XtDisplay(w);
xevent.xfocus.mode = NotifyNormal;
xevent.xfocus.detail = NotifyAncestor;
trap_errors();
X... | Bypass | 0 | static void xt_client_simulate_focus(Widget w, int type)
{
XEvent xevent;
memset(&xevent, 0, sizeof(xevent));
xevent.xfocus.type = type;
xevent.xfocus.window = XtWindow(w);
xevent.xfocus.display = XtDisplay(w);
xevent.xfocus.mode = NotifyNormal;
xevent.xfocus.detail = NotifyAncestor;
trap_errors();
X... | @@ -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:
... | CWE-264 | null | null |
21,734 | static void xt_dummy_input_cb(XtPointer closure, int *source, XtInputId *id)
{
/* dummy function, never called */
npw_printf("ERROR: xt_dummy_input_cb() should never be called\n");
}
| Bypass | 0 | static void xt_dummy_input_cb(XtPointer closure, int *source, XtInputId *id)
{
/* dummy function, never called */
npw_printf("ERROR: xt_dummy_input_cb() should never be called\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:
... | CWE-264 | null | null |
21,735 | static void xt_dummy_timeout_cb(XtPointer closure, XtIntervalId *id)
{
/* dummy function, never called */
npw_printf("ERROR: xt_dummy_timeout_cb() should never be called\n");
}
| Bypass | 0 | static void xt_dummy_timeout_cb(XtPointer closure, XtIntervalId *id)
{
/* dummy function, never called */
npw_printf("ERROR: xt_dummy_timeout_cb() should never be called\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:
... | CWE-264 | null | null |
21,736 | static gboolean xt_event_check(GSource *source)
{
if (xt_event_poll_fd.revents & G_IO_IN) {
int mask = XtAppPending(x_app_context);
if (mask)
return TRUE;
}
return FALSE;
}
| Bypass | 0 | static gboolean xt_event_check(GSource *source)
{
if (xt_event_poll_fd.revents & G_IO_IN) {
int mask = XtAppPending(x_app_context);
if (mask)
return TRUE;
}
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:
... | CWE-264 | null | null |
21,737 | static gboolean xt_event_prepare(GSource *source, gint *timeout)
{
int mask = XtAppPending(x_app_context);
if (mask)
return TRUE;
/* XXX: create new GPollFD for input sources? */
return (*timeout = xt_get_next_timeout(source)) == 0;
}
| Bypass | 0 | static gboolean xt_event_prepare(GSource *source, gint *timeout)
{
int mask = XtAppPending(x_app_context);
if (mask)
return TRUE;
/* XXX: create new GPollFD for input sources? */
return (*timeout = xt_get_next_timeout(source)) == 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:
... | CWE-264 | null | null |
21,738 | static int xt_get_next_timeout(GSource *source)
{
static int has_compatible_appcontext = -1;
if (has_compatible_appcontext < 0) {
if ((has_compatible_appcontext = xt_has_compatible_appcontext()) == 0)
npw_printf("WARNING: xt_get_next_timeout() is not optimizable\n");
}
int timeout = XT_DEFAULT_TIMEOUT;
if... | Bypass | 0 | static int xt_get_next_timeout(GSource *source)
{
static int has_compatible_appcontext = -1;
if (has_compatible_appcontext < 0) {
if ((has_compatible_appcontext = xt_has_compatible_appcontext()) == 0)
npw_printf("WARNING: xt_get_next_timeout() is not optimizable\n");
}
int timeout = XT_DEFAULT_TIMEOUT;
if... | @@ -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:
... | CWE-264 | null | null |
21,739 | static int xt_has_compatible_appcontext(void)
{
return xt_has_compatible_appcontext_timerQueue();
}
| Bypass | 0 | static int xt_has_compatible_appcontext(void)
{
return xt_has_compatible_appcontext_timerQueue();
}
| @@ -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:
... | CWE-264 | null | null |
21,740 | static int xt_has_compatible_appcontext_timerQueue(void)
{
int is_compatible;
XtIntervalId id;
TimerEventRec *tq, *tq_probe;
/* Try to determine where is the pointer to the next allocated
TimerEventRec.
Besides, XtAppAddTimeOut() shall not have been called already
because we want to be sure any (libXt i... | Bypass | 0 | static int xt_has_compatible_appcontext_timerQueue(void)
{
int is_compatible;
XtIntervalId id;
TimerEventRec *tq, *tq_probe;
/* Try to determine where is the pointer to the next allocated
TimerEventRec.
Besides, XtAppAddTimeOut() shall not have been called already
because we want to be sure any (libXt i... | @@ -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:
... | CWE-264 | null | null |
21,741 | static int xt_source_create(void)
{
if (++xt_source_count > 1 && xt_source != NULL)
return 0;
if ((xt_source = g_source_new(&xt_event_funcs, sizeof(GSource))) == NULL) {
npw_printf("ERROR: failed to initialize Xt events listener\n");
return -1;
}
g_source_set_priority(xt_source, GDK_PRIORITY_EVENTS);
g_so... | Bypass | 0 | static int xt_source_create(void)
{
if (++xt_source_count > 1 && xt_source != NULL)
return 0;
if ((xt_source = g_source_new(&xt_event_funcs, sizeof(GSource))) == NULL) {
npw_printf("ERROR: failed to initialize Xt events listener\n");
return -1;
}
g_source_set_priority(xt_source, GDK_PRIORITY_EVENTS);
g_so... | @@ -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:
... | CWE-264 | null | null |
21,742 | static int get_open_max(void)
{
int open_max = -1;
/* SCO OpenServer has an fcntl() to retrieve the highest *currently
open* file descriptor. */
#ifdef F_GETHFDO
if ((open_max = fcntl(-1, F_GETHFDO, 0)) >= 0)
return open_max + 1;
#endif
/* IEEE Std 1003.1-2001/Cor 1-2002 clarified the fact that return
val... | Bypass | 0 | static int get_open_max(void)
{
int open_max = -1;
/* SCO OpenServer has an fcntl() to retrieve the highest *currently
open* file descriptor. */
#ifdef F_GETHFDO
if ((open_max = fcntl(-1, F_GETHFDO, 0)) >= 0)
return open_max + 1;
#endif
/* IEEE Std 1003.1-2001/Cor 1-2002 clarified the fact that return
val... | @@ -247,6 +247,11 @@ const char *string_of_NPPVariable(int variable)
_(NPPVpluginNeedsXEmbed);
_(NPPVpluginScriptableNPObject);
_(NPPVformValue);
+ _(NPPVpluginUrlRequestsDisplayedBool);
+ _(NPPVpluginWantsAllNetworkStreams);
+ _(NPPVpluginNativeAccessibleAtkPlugId);
+ _(NPPVpluginCancelSrcStream);
+ _(NPPVSuppor... | CWE-264 | null | null |
21,743 | int id_create(void *ptr)
{
static int id = 0;
id_link(++id, ptr);
return id;
}
| Bypass | 0 | int id_create(void *ptr)
{
static int id = 0;
id_link(++id, ptr);
return id;
}
| @@ -247,6 +247,11 @@ const char *string_of_NPPVariable(int variable)
_(NPPVpluginNeedsXEmbed);
_(NPPVpluginScriptableNPObject);
_(NPPVformValue);
+ _(NPPVpluginUrlRequestsDisplayedBool);
+ _(NPPVpluginWantsAllNetworkStreams);
+ _(NPPVpluginNativeAccessibleAtkPlugId);
+ _(NPPVpluginCancelSrcStream);
+ _(NPPVSuppor... | CWE-264 | null | null |
21,744 | bool id_init(void)
{
if (g_ids == NULL)
g_ids = g_hash_table_new(NULL, NULL);
return g_ids != NULL;
}
| Bypass | 0 | bool id_init(void)
{
if (g_ids == NULL)
g_ids = g_hash_table_new(NULL, NULL);
return g_ids != NULL;
}
| @@ -247,6 +247,11 @@ const char *string_of_NPPVariable(int variable)
_(NPPVpluginNeedsXEmbed);
_(NPPVpluginScriptableNPObject);
_(NPPVformValue);
+ _(NPPVpluginUrlRequestsDisplayedBool);
+ _(NPPVpluginWantsAllNetworkStreams);
+ _(NPPVpluginNativeAccessibleAtkPlugId);
+ _(NPPVpluginCancelSrcStream);
+ _(NPPVSuppor... | CWE-264 | null | null |
21,745 | static inline void *id_key(uint32_t id)
{
return (void *)(uintptr_t)id;
}
| Bypass | 0 | static inline void *id_key(uint32_t id)
{
return (void *)(uintptr_t)id;
}
| @@ -247,6 +247,11 @@ const char *string_of_NPPVariable(int variable)
_(NPPVpluginNeedsXEmbed);
_(NPPVpluginScriptableNPObject);
_(NPPVformValue);
+ _(NPPVpluginUrlRequestsDisplayedBool);
+ _(NPPVpluginWantsAllNetworkStreams);
+ _(NPPVpluginNativeAccessibleAtkPlugId);
+ _(NPPVpluginCancelSrcStream);
+ _(NPPVSuppor... | CWE-264 | null | null |
21,746 | void id_link(int id, void *ptr)
{
g_hash_table_insert(g_ids, id_key(id), ptr);
}
| Bypass | 0 | void id_link(int id, void *ptr)
{
g_hash_table_insert(g_ids, id_key(id), ptr);
}
| @@ -247,6 +247,11 @@ const char *string_of_NPPVariable(int variable)
_(NPPVpluginNeedsXEmbed);
_(NPPVpluginScriptableNPObject);
_(NPPVformValue);
+ _(NPPVpluginUrlRequestsDisplayedBool);
+ _(NPPVpluginWantsAllNetworkStreams);
+ _(NPPVpluginNativeAccessibleAtkPlugId);
+ _(NPPVpluginCancelSrcStream);
+ _(NPPVSuppor... | CWE-264 | null | null |
21,747 | void *id_lookup(int id)
{
return g_hash_table_lookup(g_ids, id_key(id));
}
| Bypass | 0 | void *id_lookup(int id)
{
return g_hash_table_lookup(g_ids, id_key(id));
}
| @@ -247,6 +247,11 @@ const char *string_of_NPPVariable(int variable)
_(NPPVpluginNeedsXEmbed);
_(NPPVpluginScriptableNPObject);
_(NPPVformValue);
+ _(NPPVpluginUrlRequestsDisplayedBool);
+ _(NPPVpluginWantsAllNetworkStreams);
+ _(NPPVpluginNativeAccessibleAtkPlugId);
+ _(NPPVpluginCancelSrcStream);
+ _(NPPVSuppor... | CWE-264 | null | null |
21,748 | int id_lookup_value(void *ptr)
{
return g_hash_table_find(g_ids, id_match_value, &ptr) ? (uintptr_t)ptr : -1;
}
| Bypass | 0 | int id_lookup_value(void *ptr)
{
return g_hash_table_find(g_ids, id_match_value, &ptr) ? (uintptr_t)ptr : -1;
}
| @@ -247,6 +247,11 @@ const char *string_of_NPPVariable(int variable)
_(NPPVpluginNeedsXEmbed);
_(NPPVpluginScriptableNPObject);
_(NPPVformValue);
+ _(NPPVpluginUrlRequestsDisplayedBool);
+ _(NPPVpluginWantsAllNetworkStreams);
+ _(NPPVpluginNativeAccessibleAtkPlugId);
+ _(NPPVpluginCancelSrcStream);
+ _(NPPVSuppor... | CWE-264 | null | null |
21,749 | static gboolean id_match_value(gpointer key, gpointer value, gpointer user_data)
{
if (value == *(gpointer *)user_data) {
*(int *)user_data = (uintptr_t)key;
return true;
}
return false;
}
| Bypass | 0 | static gboolean id_match_value(gpointer key, gpointer value, gpointer user_data)
{
if (value == *(gpointer *)user_data) {
*(int *)user_data = (uintptr_t)key;
return true;
}
return false;
}
| @@ -247,6 +247,11 @@ const char *string_of_NPPVariable(int variable)
_(NPPVpluginNeedsXEmbed);
_(NPPVpluginScriptableNPObject);
_(NPPVformValue);
+ _(NPPVpluginUrlRequestsDisplayedBool);
+ _(NPPVpluginWantsAllNetworkStreams);
+ _(NPPVpluginNativeAccessibleAtkPlugId);
+ _(NPPVpluginCancelSrcStream);
+ _(NPPVSuppor... | CWE-264 | null | null |
21,750 | bool id_remove(int id)
{
return g_hash_table_remove(g_ids, id_key(id));
}
| Bypass | 0 | bool id_remove(int id)
{
return g_hash_table_remove(g_ids, id_key(id));
}
| @@ -247,6 +247,11 @@ const char *string_of_NPPVariable(int variable)
_(NPPVpluginNeedsXEmbed);
_(NPPVpluginScriptableNPObject);
_(NPPVformValue);
+ _(NPPVpluginUrlRequestsDisplayedBool);
+ _(NPPVpluginWantsAllNetworkStreams);
+ _(NPPVpluginNativeAccessibleAtkPlugId);
+ _(NPPVpluginCancelSrcStream);
+ _(NPPVSuppor... | CWE-264 | null | null |
21,751 | int main(void)
{
char *str;
int i, id;
id_init();
#define N_CELLS_PER_SLOT 8
#define N_STRINGS ((2 * N_CELLS_PER_SLOT) + 3)
char *strings[N_STRINGS];
int ids[N_STRINGS];
for (i = 0; i < N_STRINGS; i++) {
str = malloc(10);
sprintf(str, "%d", i);
strings[i] = str;
id = id_create(str);
if (id < 0) {
... | Bypass | 0 | int main(void)
{
char *str;
int i, id;
id_init();
#define N_CELLS_PER_SLOT 8
#define N_STRINGS ((2 * N_CELLS_PER_SLOT) + 3)
char *strings[N_STRINGS];
int ids[N_STRINGS];
for (i = 0; i < N_STRINGS; i++) {
str = malloc(10);
sprintf(str, "%d", i);
strings[i] = str;
id = id_create(str);
if (id < 0) {
... | @@ -247,6 +247,11 @@ const char *string_of_NPPVariable(int variable)
_(NPPVpluginNeedsXEmbed);
_(NPPVpluginScriptableNPObject);
_(NPPVformValue);
+ _(NPPVpluginUrlRequestsDisplayedBool);
+ _(NPPVpluginWantsAllNetworkStreams);
+ _(NPPVpluginNativeAccessibleAtkPlugId);
+ _(NPPVpluginCancelSrcStream);
+ _(NPPVSuppor... | CWE-264 | null | null |
21,752 | char *npw_asprintf(const char *format, ...)
{
va_list args;
va_start(args, format);
int alen = vsnprintf(NULL, 0, format, args);
va_end(args);
char *str = malloc(alen+1);
if (str == NULL)
return NULL;
va_start(args, format);
int rlen = vsnprintf(str, alen+1, format, args);
va_end(args);
if (rlen !=... | Bypass | 0 | char *npw_asprintf(const char *format, ...)
{
va_list args;
va_start(args, format);
int alen = vsnprintf(NULL, 0, format, args);
va_end(args);
char *str = malloc(alen+1);
if (str == NULL)
return NULL;
va_start(args, format);
int rlen = vsnprintf(str, alen+1, format, args);
va_end(args);
if (rlen !=... | @@ -247,6 +247,11 @@ const char *string_of_NPPVariable(int variable)
_(NPPVpluginNeedsXEmbed);
_(NPPVpluginScriptableNPObject);
_(NPPVformValue);
+ _(NPPVpluginUrlRequestsDisplayedBool);
+ _(NPPVpluginWantsAllNetworkStreams);
+ _(NPPVpluginNativeAccessibleAtkPlugId);
+ _(NPPVpluginCancelSrcStream);
+ _(NPPVSuppor... | CWE-264 | null | null |
21,753 | void npw_perror(const char *prefix, int error)
{
if (prefix && *prefix)
npw_printf("ERROR: %s: %s\n", prefix, npw_strerror(error));
else
npw_printf("ERROR: %s\n", npw_strerror(error));
}
| Bypass | 0 | void npw_perror(const char *prefix, int error)
{
if (prefix && *prefix)
npw_printf("ERROR: %s: %s\n", prefix, npw_strerror(error));
else
npw_printf("ERROR: %s\n", npw_strerror(error));
}
| @@ -247,6 +247,11 @@ const char *string_of_NPPVariable(int variable)
_(NPPVpluginNeedsXEmbed);
_(NPPVpluginScriptableNPObject);
_(NPPVformValue);
+ _(NPPVpluginUrlRequestsDisplayedBool);
+ _(NPPVpluginWantsAllNetworkStreams);
+ _(NPPVpluginNativeAccessibleAtkPlugId);
+ _(NPPVpluginCancelSrcStream);
+ _(NPPVSuppor... | CWE-264 | null | null |
21,754 | const char *npw_strerror(int error)
{
if (error > -1100 && error <= -1000) // RPC errors
return rpc_strerror(error);
switch (error) {
case 0: return "No error";
}
return "Unknown error";
}
| Bypass | 0 | const char *npw_strerror(int error)
{
if (error > -1100 && error <= -1000) // RPC errors
return rpc_strerror(error);
switch (error) {
case 0: return "No error";
}
return "Unknown error";
}
| @@ -247,6 +247,11 @@ const char *string_of_NPPVariable(int variable)
_(NPPVpluginNeedsXEmbed);
_(NPPVpluginScriptableNPObject);
_(NPPVformValue);
+ _(NPPVpluginUrlRequestsDisplayedBool);
+ _(NPPVpluginWantsAllNetworkStreams);
+ _(NPPVpluginNativeAccessibleAtkPlugId);
+ _(NPPVpluginCancelSrcStream);
+ _(NPPVSuppor... | CWE-264 | null | null |
21,755 | const char *string_of_NPError(int error)
{
const char *str;
switch ((NPError)error) {
#define _(VAL) case VAL: str = #VAL; break;
_(NPERR_NO_ERROR);
_(NPERR_GENERIC_ERROR);
_(NPERR_INVALID_INSTANCE_ERROR);
_(NPERR_INVALID_FUNCTABLE_ERROR);
_(NPERR_MODULE_LOAD_FAILED_ERROR);
_(NPERR_OUT_OF_MEMORY_ERROR);
_(N... | Bypass | 0 | const char *string_of_NPError(int error)
{
const char *str;
switch ((NPError)error) {
#define _(VAL) case VAL: str = #VAL; break;
_(NPERR_NO_ERROR);
_(NPERR_GENERIC_ERROR);
_(NPERR_INVALID_INSTANCE_ERROR);
_(NPERR_INVALID_FUNCTABLE_ERROR);
_(NPERR_MODULE_LOAD_FAILED_ERROR);
_(NPERR_OUT_OF_MEMORY_ERROR);
_(N... | @@ -247,6 +247,11 @@ const char *string_of_NPPVariable(int variable)
_(NPPVpluginNeedsXEmbed);
_(NPPVpluginScriptableNPObject);
_(NPPVformValue);
+ _(NPPVpluginUrlRequestsDisplayedBool);
+ _(NPPVpluginWantsAllNetworkStreams);
+ _(NPPVpluginNativeAccessibleAtkPlugId);
+ _(NPPVpluginCancelSrcStream);
+ _(NPPVSuppor... | CWE-264 | null | null |
21,756 | const char *string_of_NPReason(int reason)
{
const char *str;
switch ((NPReason)reason) {
#define _(VAL) case VAL: str = #VAL; break;
_(NPRES_DONE);
_(NPRES_NETWORK_ERR);
_(NPRES_USER_BREAK);
#undef _
default:
str = "<unknown reason>";
break;
}
return str;
}
| Bypass | 0 | const char *string_of_NPReason(int reason)
{
const char *str;
switch ((NPReason)reason) {
#define _(VAL) case VAL: str = #VAL; break;
_(NPRES_DONE);
_(NPRES_NETWORK_ERR);
_(NPRES_USER_BREAK);
#undef _
default:
str = "<unknown reason>";
break;
}
return str;
}
| @@ -247,6 +247,11 @@ const char *string_of_NPPVariable(int variable)
_(NPPVpluginNeedsXEmbed);
_(NPPVpluginScriptableNPObject);
_(NPPVformValue);
+ _(NPPVpluginUrlRequestsDisplayedBool);
+ _(NPPVpluginWantsAllNetworkStreams);
+ _(NPPVpluginNativeAccessibleAtkPlugId);
+ _(NPPVpluginCancelSrcStream);
+ _(NPPVSuppor... | CWE-264 | null | null |
21,757 | const char *string_of_NPStreamType(int stype)
{
const char *str;
switch (stype) {
#define _(VAL) case VAL: str = #VAL; break;
_(NP_NORMAL);
_(NP_SEEK);
_(NP_ASFILE);
_(NP_ASFILEONLY);
#undef _
default:
str = "<unknown stream type>";
break;
}
return str;
}
| Bypass | 0 | const char *string_of_NPStreamType(int stype)
{
const char *str;
switch (stype) {
#define _(VAL) case VAL: str = #VAL; break;
_(NP_NORMAL);
_(NP_SEEK);
_(NP_ASFILE);
_(NP_ASFILEONLY);
#undef _
default:
str = "<unknown stream type>";
break;
}
return str;
}
| @@ -247,6 +247,11 @@ const char *string_of_NPPVariable(int variable)
_(NPPVpluginNeedsXEmbed);
_(NPPVpluginScriptableNPObject);
_(NPPVformValue);
+ _(NPPVpluginUrlRequestsDisplayedBool);
+ _(NPPVpluginWantsAllNetworkStreams);
+ _(NPPVpluginNativeAccessibleAtkPlugId);
+ _(NPPVpluginCancelSrcStream);
+ _(NPPVSuppor... | CWE-264 | null | null |
21,758 | SYSCALL_DEFINE0(getpagesize)
{
return PAGE_SIZE;
}
| +Priv | 0 | SYSCALL_DEFINE0(getpagesize)
{
return PAGE_SIZE;
}
| @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,759 | SYSCALL_DEFINE1(osf_brk, unsigned long, brk)
{
unsigned long retval = sys_brk(brk);
if (brk && brk != retval)
retval = -ENOMEM;
return retval;
}
| +Priv | 0 | SYSCALL_DEFINE1(osf_brk, unsigned long, brk)
{
unsigned long retval = sys_brk(brk);
if (brk && brk != retval)
retval = -ENOMEM;
return retval;
}
| @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,760 | SYSCALL_DEFINE2(osf_proplist_syscall, enum pl_code, code,
union pl_args __user *, args)
{
long error;
int __user *min_buf_size_ptr;
switch (code) {
case PL_SET:
if (get_user(error, &args->set.nbytes))
error = -EFAULT;
break;
case PL_FSET:
if (get_user(error, &args->fset.nbytes))
error = -EFAULT;
b... | +Priv | 0 | SYSCALL_DEFINE2(osf_proplist_syscall, enum pl_code, code,
union pl_args __user *, args)
{
long error;
int __user *min_buf_size_ptr;
switch (code) {
case PL_SET:
if (get_user(error, &args->set.nbytes))
error = -EFAULT;
break;
case PL_FSET:
if (get_user(error, &args->fset.nbytes))
error = -EFAULT;
b... | @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,761 | SYSCALL_DEFINE2(osf_sigstack, struct sigstack __user *, uss,
struct sigstack __user *, uoss)
{
unsigned long usp = rdusp();
unsigned long oss_sp = current->sas_ss_sp + current->sas_ss_size;
unsigned long oss_os = on_sig_stack(usp);
int error;
if (uss) {
void __user *ss_sp;
error = -EFAULT;
if (get_user(s... | +Priv | 0 | SYSCALL_DEFINE2(osf_sigstack, struct sigstack __user *, uss,
struct sigstack __user *, uoss)
{
unsigned long usp = rdusp();
unsigned long oss_sp = current->sas_ss_sp + current->sas_ss_size;
unsigned long oss_os = on_sig_stack(usp);
int error;
if (uss) {
void __user *ss_sp;
error = -EFAULT;
if (get_user(s... | @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,762 | SYSCALL_DEFINE2(osf_settimeofday, struct timeval32 __user *, tv,
struct timezone __user *, tz)
{
struct timespec kts;
struct timezone ktz;
if (tv) {
if (get_tv32((struct timeval *)&kts, tv))
return -EFAULT;
}
if (tz) {
if (copy_from_user(&ktz, tz, sizeof(*tz)))
return -EFAULT;
}
kts.tv_nsec *= 100... | +Priv | 0 | SYSCALL_DEFINE2(osf_settimeofday, struct timeval32 __user *, tv,
struct timezone __user *, tz)
{
struct timespec kts;
struct timezone ktz;
if (tv) {
if (get_tv32((struct timeval *)&kts, tv))
return -EFAULT;
}
if (tz) {
if (copy_from_user(&ktz, tz, sizeof(*tz)))
return -EFAULT;
}
kts.tv_nsec *= 100... | @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,763 | SYSCALL_DEFINE2(osf_getitimer, int, which, struct itimerval32 __user *, it)
{
struct itimerval kit;
int error;
error = do_getitimer(which, &kit);
if (!error && put_it32(it, &kit))
error = -EFAULT;
return error;
}
| +Priv | 0 | SYSCALL_DEFINE2(osf_getitimer, int, which, struct itimerval32 __user *, it)
{
struct itimerval kit;
int error;
error = do_getitimer(which, &kit);
if (!error && put_it32(it, &kit))
error = -EFAULT;
return error;
}
| @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,764 | SYSCALL_DEFINE2(osf_utimes, const char __user *, filename,
struct timeval32 __user *, tvs)
{
struct timespec tv[2];
if (tvs) {
struct timeval ktvs[2];
if (get_tv32(&ktvs[0], &tvs[0]) ||
get_tv32(&ktvs[1], &tvs[1]))
return -EFAULT;
if (ktvs[0].tv_usec < 0 || ktvs[0].tv_usec >= 1000000 ||
ktvs[... | +Priv | 0 | SYSCALL_DEFINE2(osf_utimes, const char __user *, filename,
struct timeval32 __user *, tvs)
{
struct timespec tv[2];
if (tvs) {
struct timeval ktvs[2];
if (get_tv32(&ktvs[0], &tvs[0]) ||
get_tv32(&ktvs[1], &tvs[1]))
return -EFAULT;
if (ktvs[0].tv_usec < 0 || ktvs[0].tv_usec >= 1000000 ||
ktvs[... | @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,765 | SYSCALL_DEFINE2(osf_getrusage, int, who, struct rusage32 __user *, ru)
{
struct rusage32 r;
if (who != RUSAGE_SELF && who != RUSAGE_CHILDREN)
return -EINVAL;
memset(&r, 0, sizeof(r));
switch (who) {
case RUSAGE_SELF:
jiffies_to_timeval32(current->utime, &r.ru_utime);
jiffies_to_timeval32(current->stime, &r... | +Priv | 0 | SYSCALL_DEFINE2(osf_getrusage, int, who, struct rusage32 __user *, ru)
{
struct rusage32 r;
if (who != RUSAGE_SELF && who != RUSAGE_CHILDREN)
return -EINVAL;
memset(&r, 0, sizeof(r));
switch (who) {
case RUSAGE_SELF:
jiffies_to_timeval32(current->utime, &r.ru_utime);
jiffies_to_timeval32(current->stime, &r... | @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,766 | SYSCALL_DEFINE2(osf_usleep_thread, struct timeval32 __user *, sleep,
struct timeval32 __user *, remain)
{
struct timeval tmp;
unsigned long ticks;
if (get_tv32(&tmp, sleep))
goto fault;
ticks = timeval_to_jiffies(&tmp);
ticks = schedule_timeout_interruptible(ticks);
if (remain) {
jiffies_to_timeval(tick... | +Priv | 0 | SYSCALL_DEFINE2(osf_usleep_thread, struct timeval32 __user *, sleep,
struct timeval32 __user *, remain)
{
struct timeval tmp;
unsigned long ticks;
if (get_tv32(&tmp, sleep))
goto fault;
ticks = timeval_to_jiffies(&tmp);
ticks = schedule_timeout_interruptible(ticks);
if (remain) {
jiffies_to_timeval(tick... | @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,767 | SYSCALL_DEFINE3(osf_statfs, const char __user *, pathname,
struct osf_statfs __user *, buffer, unsigned long, bufsiz)
{
struct kstatfs linux_stat;
int error = user_statfs(pathname, &linux_stat);
if (!error)
error = linux_to_osf_statfs(&linux_stat, buffer, bufsiz);
return error;
}
| +Priv | 0 | SYSCALL_DEFINE3(osf_statfs, const char __user *, pathname,
struct osf_statfs __user *, buffer, unsigned long, bufsiz)
{
struct kstatfs linux_stat;
int error = user_statfs(pathname, &linux_stat);
if (!error)
error = linux_to_osf_statfs(&linux_stat, buffer, bufsiz);
return error;
}
| @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,768 | SYSCALL_DEFINE3(osf_fstatfs, unsigned long, fd,
struct osf_statfs __user *, buffer, unsigned long, bufsiz)
{
struct kstatfs linux_stat;
int error = fd_statfs(fd, &linux_stat);
if (!error)
error = linux_to_osf_statfs(&linux_stat, buffer, bufsiz);
return error;
}
| +Priv | 0 | SYSCALL_DEFINE3(osf_fstatfs, unsigned long, fd,
struct osf_statfs __user *, buffer, unsigned long, bufsiz)
{
struct kstatfs linux_stat;
int error = fd_statfs(fd, &linux_stat);
if (!error)
error = linux_to_osf_statfs(&linux_stat, buffer, bufsiz);
return error;
}
| @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,769 | SYSCALL_DEFINE3(osf_setitimer, int, which, struct itimerval32 __user *, in,
struct itimerval32 __user *, out)
{
struct itimerval kin, kout;
int error;
if (in) {
if (get_it32(&kin, in))
return -EFAULT;
} else
memset(&kin, 0, sizeof(kin));
error = do_setitimer(which, &kin, out ? &kout : NULL);
if (error ... | +Priv | 0 | SYSCALL_DEFINE3(osf_setitimer, int, which, struct itimerval32 __user *, in,
struct itimerval32 __user *, out)
{
struct itimerval kin, kout;
int error;
if (in) {
if (get_it32(&kin, in))
return -EFAULT;
} else
memset(&kin, 0, sizeof(kin));
error = do_setitimer(which, &kin, out ? &kout : NULL);
if (error ... | @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,770 | SYSCALL_DEFINE3(osf_writev, unsigned long, fd,
const struct iovec __user *, vector, unsigned long, count)
{
if (unlikely(personality(current->personality) == PER_OSF4))
if (osf_fix_iov_len(vector, count))
return -EFAULT;
return sys_writev(fd, vector, count);
}
| +Priv | 0 | SYSCALL_DEFINE3(osf_writev, unsigned long, fd,
const struct iovec __user *, vector, unsigned long, count)
{
if (unlikely(personality(current->personality) == PER_OSF4))
if (osf_fix_iov_len(vector, count))
return -EFAULT;
return sys_writev(fd, vector, count);
}
| @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,771 | SYSCALL_DEFINE4(osf_set_program_attributes, unsigned long, text_start,
unsigned long, text_len, unsigned long, bss_start,
unsigned long, bss_len)
{
struct mm_struct *mm;
mm = current->mm;
mm->end_code = bss_start + bss_len;
mm->start_brk = bss_start + bss_len;
mm->brk = bss_start + bss_len;
#if 0
printk("set... | +Priv | 0 | SYSCALL_DEFINE4(osf_set_program_attributes, unsigned long, text_start,
unsigned long, text_len, unsigned long, bss_start,
unsigned long, bss_len)
{
struct mm_struct *mm;
mm = current->mm;
mm->end_code = bss_start + bss_len;
mm->start_brk = bss_start + bss_len;
mm->brk = bss_start + bss_len;
#if 0
printk("set... | @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,772 | SYSCALL_DEFINE5(osf_setsysinfo, unsigned long, op, void __user *, buffer,
unsigned long, nbytes, int __user *, start, void __user *, arg)
{
switch (op) {
case SSI_IEEE_FP_CONTROL: {
unsigned long swcr, fpcr;
unsigned int *state;
/*
* Alpha Architecture Handbook 4.7.7.3:
* To be fully IEEE compiant, we... | +Priv | 0 | SYSCALL_DEFINE5(osf_setsysinfo, unsigned long, op, void __user *, buffer,
unsigned long, nbytes, int __user *, start, void __user *, arg)
{
switch (op) {
case SSI_IEEE_FP_CONTROL: {
unsigned long swcr, fpcr;
unsigned int *state;
/*
* Alpha Architecture Handbook 4.7.7.3:
* To be fully IEEE compiant, we... | @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,773 | SYSCALL_DEFINE5(osf_select, int, n, fd_set __user *, inp, fd_set __user *, outp,
fd_set __user *, exp, struct timeval32 __user *, tvp)
{
struct timespec end_time, *to = NULL;
if (tvp) {
time_t sec, usec;
to = &end_time;
if (!access_ok(VERIFY_READ, tvp, sizeof(*tvp))
|| __get_user(sec, &tvp->tv_sec)
... | +Priv | 0 | SYSCALL_DEFINE5(osf_select, int, n, fd_set __user *, inp, fd_set __user *, outp,
fd_set __user *, exp, struct timeval32 __user *, tvp)
{
struct timespec end_time, *to = NULL;
if (tvp) {
time_t sec, usec;
to = &end_time;
if (!access_ok(VERIFY_READ, tvp, sizeof(*tvp))
|| __get_user(sec, &tvp->tv_sec)
... | @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,774 | SYSCALL_DEFINE6(osf_mmap, unsigned long, addr, unsigned long, len,
unsigned long, prot, unsigned long, flags, unsigned long, fd,
unsigned long, off)
{
unsigned long ret = -EINVAL;
#if 0
if (flags & (_MAP_HASSEMAPHORE | _MAP_INHERIT | _MAP_UNALIGNED))
printk("%s: unimplemented OSF mmap flags %04lx\n",
curre... | +Priv | 0 | SYSCALL_DEFINE6(osf_mmap, unsigned long, addr, unsigned long, len,
unsigned long, prot, unsigned long, flags, unsigned long, fd,
unsigned long, off)
{
unsigned long ret = -EINVAL;
#if 0
if (flags & (_MAP_HASSEMAPHORE | _MAP_INHERIT | _MAP_UNALIGNED))
printk("%s: unimplemented OSF mmap flags %04lx\n",
curre... | @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,775 | arch_get_unmapped_area(struct file *filp, unsigned long addr,
unsigned long len, unsigned long pgoff,
unsigned long flags)
{
unsigned long limit;
/* "32 bit" actually means 31 bit, since pointers sign extend. */
if (current->personality & ADDR_LIMIT_32BIT)
limit = 0x80000000;
else
limit = TA... | +Priv | 0 | arch_get_unmapped_area(struct file *filp, unsigned long addr,
unsigned long len, unsigned long pgoff,
unsigned long flags)
{
unsigned long limit;
/* "32 bit" actually means 31 bit, since pointers sign extend. */
if (current->personality & ADDR_LIMIT_32BIT)
limit = 0x80000000;
else
limit = TA... | @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,776 | arch_get_unmapped_area_1(unsigned long addr, unsigned long len,
unsigned long limit)
{
struct vm_area_struct *vma = find_vma(current->mm, addr);
while (1) {
/* At this point: (!vma || addr < vma->vm_end). */
if (limit - len < addr)
return -ENOMEM;
if (!vma || addr + len <= vma->vm_start)
retu... | +Priv | 0 | arch_get_unmapped_area_1(unsigned long addr, unsigned long len,
unsigned long limit)
{
struct vm_area_struct *vma = find_vma(current->mm, addr);
while (1) {
/* At this point: (!vma || addr < vma->vm_end). */
if (limit - len < addr)
return -ENOMEM;
if (!vma || addr + len <= vma->vm_start)
retu... | @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,777 | get_tv32(struct timeval *o, struct timeval32 __user *i)
{
return (!access_ok(VERIFY_READ, i, sizeof(*i)) ||
(__get_user(o->tv_sec, &i->tv_sec) |
__get_user(o->tv_usec, &i->tv_usec)));
}
| +Priv | 0 | get_tv32(struct timeval *o, struct timeval32 __user *i)
{
return (!access_ok(VERIFY_READ, i, sizeof(*i)) ||
(__get_user(o->tv_sec, &i->tv_sec) |
__get_user(o->tv_usec, &i->tv_usec)));
}
| @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,778 | jiffies_to_timeval32(unsigned long jiffies, struct timeval32 *value)
{
value->tv_usec = (jiffies % HZ) * (1000000L / HZ);
value->tv_sec = jiffies / HZ;
}
| +Priv | 0 | jiffies_to_timeval32(unsigned long jiffies, struct timeval32 *value)
{
value->tv_usec = (jiffies % HZ) * (1000000L / HZ);
value->tv_sec = jiffies / HZ;
}
| @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,779 | linux_to_osf_statfs(struct kstatfs *linux_stat, struct osf_statfs __user *osf_stat,
unsigned long bufsiz)
{
struct osf_statfs tmp_stat;
tmp_stat.f_type = linux_stat->f_type;
tmp_stat.f_flags = 0; /* mount flags */
tmp_stat.f_fsize = linux_stat->f_frsize;
tmp_stat.f_bsize = linux_stat->f_bsize;
tmp_stat.f_b... | +Priv | 0 | linux_to_osf_statfs(struct kstatfs *linux_stat, struct osf_statfs __user *osf_stat,
unsigned long bufsiz)
{
struct osf_statfs tmp_stat;
tmp_stat.f_type = linux_stat->f_type;
tmp_stat.f_flags = 0; /* mount flags */
tmp_stat.f_fsize = linux_stat->f_frsize;
tmp_stat.f_bsize = linux_stat->f_bsize;
tmp_stat.f_b... | @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,780 | osf_filldir(void *__buf, const char *name, int namlen, loff_t offset,
u64 ino, unsigned int d_type)
{
struct osf_dirent __user *dirent;
struct osf_dirent_callback *buf = (struct osf_dirent_callback *) __buf;
unsigned int reclen = ALIGN(NAME_OFFSET + namlen + 1, sizeof(u32));
unsigned int d_ino;
buf->error = ... | +Priv | 0 | osf_filldir(void *__buf, const char *name, int namlen, loff_t offset,
u64 ino, unsigned int d_type)
{
struct osf_dirent __user *dirent;
struct osf_dirent_callback *buf = (struct osf_dirent_callback *) __buf;
unsigned int reclen = ALIGN(NAME_OFFSET + namlen + 1, sizeof(u32));
unsigned int d_ino;
buf->error = ... | @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,781 | osf_fix_iov_len(const struct iovec __user *iov, unsigned long count)
{
unsigned long i;
for (i = 0 ; i < count ; i++) {
int __user *iov_len_high = (int __user *)&iov[i].iov_len + 1;
if (put_user(0, iov_len_high))
return -EFAULT;
}
return 0;
}
| +Priv | 0 | osf_fix_iov_len(const struct iovec __user *iov, unsigned long count)
{
unsigned long i;
for (i = 0 ; i < count ; i++) {
int __user *iov_len_high = (int __user *)&iov[i].iov_len + 1;
if (put_user(0, iov_len_high))
return -EFAULT;
}
return 0;
}
| @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,782 | osf_procfs_mount(char *dirname, struct procfs_args __user *args, int flags)
{
struct procfs_args tmp;
if (copy_from_user(&tmp, args, sizeof(tmp)))
return -EFAULT;
return do_mount("", dirname, "proc", flags, NULL);
}
| +Priv | 0 | osf_procfs_mount(char *dirname, struct procfs_args __user *args, int flags)
{
struct procfs_args tmp;
if (copy_from_user(&tmp, args, sizeof(tmp)))
return -EFAULT;
return do_mount("", dirname, "proc", flags, NULL);
}
| @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,783 | osf_ufs_mount(char *dirname, struct ufs_args __user *args, int flags)
{
int retval;
struct cdfs_args tmp;
char *devname;
retval = -EFAULT;
if (copy_from_user(&tmp, args, sizeof(tmp)))
goto out;
devname = getname(tmp.devname);
retval = PTR_ERR(devname);
if (IS_ERR(devname))
goto out;
retval = do_mount(devn... | +Priv | 0 | osf_ufs_mount(char *dirname, struct ufs_args __user *args, int flags)
{
int retval;
struct cdfs_args tmp;
char *devname;
retval = -EFAULT;
if (copy_from_user(&tmp, args, sizeof(tmp)))
goto out;
devname = getname(tmp.devname);
retval = PTR_ERR(devname);
if (IS_ERR(devname))
goto out;
retval = do_mount(devn... | @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,784 | put_it32(struct itimerval32 __user *o, struct itimerval *i)
{
return (!access_ok(VERIFY_WRITE, o, sizeof(*o)) ||
(__put_user(i->it_interval.tv_sec, &o->it_interval.tv_sec) |
__put_user(i->it_interval.tv_usec, &o->it_interval.tv_usec) |
__put_user(i->it_value.tv_sec, &o->it_value.tv_sec) |
__put_user(i->it_v... | +Priv | 0 | put_it32(struct itimerval32 __user *o, struct itimerval *i)
{
return (!access_ok(VERIFY_WRITE, o, sizeof(*o)) ||
(__put_user(i->it_interval.tv_sec, &o->it_interval.tv_sec) |
__put_user(i->it_interval.tv_usec, &o->it_interval.tv_usec) |
__put_user(i->it_value.tv_sec, &o->it_value.tv_sec) |
__put_user(i->it_v... | @@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
return -EFAULT;
len = namelen;
- if (namelen > 32)
+ if (len > 32)
len = 32;
down_read(&uts_sem);
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
down_read(&uts_sem);... | CWE-264 | null | null |
21,785 | int __ksm_enter(struct mm_struct *mm)
{
struct mm_slot *mm_slot;
int needs_wakeup;
mm_slot = alloc_mm_slot();
if (!mm_slot)
return -ENOMEM;
/* Check ksm_run too? Would need tighter locking */
needs_wakeup = list_empty(&ksm_mm_head.mm_list);
spin_lock(&ksm_mmlist_lock);
insert_to_mm_slots_hash(mm, mm_slot)... | DoS | 0 | int __ksm_enter(struct mm_struct *mm)
{
struct mm_slot *mm_slot;
int needs_wakeup;
mm_slot = alloc_mm_slot();
if (!mm_slot)
return -ENOMEM;
/* Check ksm_run too? Would need tighter locking */
needs_wakeup = list_empty(&ksm_mm_head.mm_list);
spin_lock(&ksm_mmlist_lock);
insert_to_mm_slots_hash(mm, mm_slot)... | @@ -1302,6 +1302,12 @@ static struct rmap_item *scan_get_next_rmap_item(struct page **page)
slot = list_entry(slot->mm_list.next, struct mm_slot, mm_list);
ksm_scan.mm_slot = slot;
spin_unlock(&ksm_mmlist_lock);
+ /*
+ * Although we tested list_empty() above, a racing __ksm_exit
+ * of the last mm on the ... | CWE-362 | null | null |
21,786 | static inline struct rmap_item *alloc_rmap_item(void)
{
struct rmap_item *rmap_item;
rmap_item = kmem_cache_zalloc(rmap_item_cache, GFP_KERNEL);
if (rmap_item)
ksm_rmap_items++;
return rmap_item;
}
| DoS | 0 | static inline struct rmap_item *alloc_rmap_item(void)
{
struct rmap_item *rmap_item;
rmap_item = kmem_cache_zalloc(rmap_item_cache, GFP_KERNEL);
if (rmap_item)
ksm_rmap_items++;
return rmap_item;
}
| @@ -1302,6 +1302,12 @@ static struct rmap_item *scan_get_next_rmap_item(struct page **page)
slot = list_entry(slot->mm_list.next, struct mm_slot, mm_list);
ksm_scan.mm_slot = slot;
spin_unlock(&ksm_mmlist_lock);
+ /*
+ * Although we tested list_empty() above, a racing __ksm_exit
+ * of the last mm on the ... | CWE-362 | null | null |
21,787 | static inline struct stable_node *alloc_stable_node(void)
{
return kmem_cache_alloc(stable_node_cache, GFP_KERNEL);
}
| DoS | 0 | static inline struct stable_node *alloc_stable_node(void)
{
return kmem_cache_alloc(stable_node_cache, GFP_KERNEL);
}
| @@ -1302,6 +1302,12 @@ static struct rmap_item *scan_get_next_rmap_item(struct page **page)
slot = list_entry(slot->mm_list.next, struct mm_slot, mm_list);
ksm_scan.mm_slot = slot;
spin_unlock(&ksm_mmlist_lock);
+ /*
+ * Although we tested list_empty() above, a racing __ksm_exit
+ * of the last mm on the ... | CWE-362 | null | null |
21,788 | static int break_ksm(struct vm_area_struct *vma, unsigned long addr)
{
struct page *page;
int ret = 0;
do {
cond_resched();
page = follow_page(vma, addr, FOLL_GET);
if (IS_ERR_OR_NULL(page))
break;
if (PageKsm(page))
ret = handle_mm_fault(vma->vm_mm, vma, addr,
FAULT_FLAG_WRITE);
else
ret ... | DoS | 0 | static int break_ksm(struct vm_area_struct *vma, unsigned long addr)
{
struct page *page;
int ret = 0;
do {
cond_resched();
page = follow_page(vma, addr, FOLL_GET);
if (IS_ERR_OR_NULL(page))
break;
if (PageKsm(page))
ret = handle_mm_fault(vma->vm_mm, vma, addr,
FAULT_FLAG_WRITE);
else
ret ... | @@ -1302,6 +1302,12 @@ static struct rmap_item *scan_get_next_rmap_item(struct page **page)
slot = list_entry(slot->mm_list.next, struct mm_slot, mm_list);
ksm_scan.mm_slot = slot;
spin_unlock(&ksm_mmlist_lock);
+ /*
+ * Although we tested list_empty() above, a racing __ksm_exit
+ * of the last mm on the ... | CWE-362 | null | null |
21,789 | static u32 calc_checksum(struct page *page)
{
u32 checksum;
void *addr = kmap_atomic(page, KM_USER0);
checksum = jhash2(addr, PAGE_SIZE / 4, 17);
kunmap_atomic(addr, KM_USER0);
return checksum;
}
| DoS | 0 | static u32 calc_checksum(struct page *page)
{
u32 checksum;
void *addr = kmap_atomic(page, KM_USER0);
checksum = jhash2(addr, PAGE_SIZE / 4, 17);
kunmap_atomic(addr, KM_USER0);
return checksum;
}
| @@ -1302,6 +1302,12 @@ static struct rmap_item *scan_get_next_rmap_item(struct page **page)
slot = list_entry(slot->mm_list.next, struct mm_slot, mm_list);
ksm_scan.mm_slot = slot;
spin_unlock(&ksm_mmlist_lock);
+ /*
+ * Although we tested list_empty() above, a racing __ksm_exit
+ * of the last mm on the ... | CWE-362 | null | null |
21,790 | static void cmp_and_merge_page(struct page *page, struct rmap_item *rmap_item)
{
struct rmap_item *tree_rmap_item;
struct page *tree_page = NULL;
struct stable_node *stable_node;
struct page *kpage;
unsigned int checksum;
int err;
remove_rmap_item_from_tree(rmap_item);
/* We first start with searching the pag... | DoS | 0 | static void cmp_and_merge_page(struct page *page, struct rmap_item *rmap_item)
{
struct rmap_item *tree_rmap_item;
struct page *tree_page = NULL;
struct stable_node *stable_node;
struct page *kpage;
unsigned int checksum;
int err;
remove_rmap_item_from_tree(rmap_item);
/* We first start with searching the pag... | @@ -1302,6 +1302,12 @@ static struct rmap_item *scan_get_next_rmap_item(struct page **page)
slot = list_entry(slot->mm_list.next, struct mm_slot, mm_list);
ksm_scan.mm_slot = slot;
spin_unlock(&ksm_mmlist_lock);
+ /*
+ * Although we tested list_empty() above, a racing __ksm_exit
+ * of the last mm on the ... | CWE-362 | null | null |
21,791 | static inline void free_rmap_item(struct rmap_item *rmap_item)
{
ksm_rmap_items--;
rmap_item->mm = NULL; /* debug safety */
kmem_cache_free(rmap_item_cache, rmap_item);
}
| DoS | 0 | static inline void free_rmap_item(struct rmap_item *rmap_item)
{
ksm_rmap_items--;
rmap_item->mm = NULL; /* debug safety */
kmem_cache_free(rmap_item_cache, rmap_item);
}
| @@ -1302,6 +1302,12 @@ static struct rmap_item *scan_get_next_rmap_item(struct page **page)
slot = list_entry(slot->mm_list.next, struct mm_slot, mm_list);
ksm_scan.mm_slot = slot;
spin_unlock(&ksm_mmlist_lock);
+ /*
+ * Although we tested list_empty() above, a racing __ksm_exit
+ * of the last mm on the ... | CWE-362 | null | null |
21,792 | static inline void free_stable_node(struct stable_node *stable_node)
{
kmem_cache_free(stable_node_cache, stable_node);
}
| DoS | 0 | static inline void free_stable_node(struct stable_node *stable_node)
{
kmem_cache_free(stable_node_cache, stable_node);
}
| @@ -1302,6 +1302,12 @@ static struct rmap_item *scan_get_next_rmap_item(struct page **page)
slot = list_entry(slot->mm_list.next, struct mm_slot, mm_list);
ksm_scan.mm_slot = slot;
spin_unlock(&ksm_mmlist_lock);
+ /*
+ * Although we tested list_empty() above, a racing __ksm_exit
+ * of the last mm on the ... | CWE-362 | null | null |
21,793 | static struct page *get_ksm_page(struct stable_node *stable_node)
{
struct page *page;
void *expected_mapping;
page = pfn_to_page(stable_node->kpfn);
expected_mapping = (void *)stable_node +
(PAGE_MAPPING_ANON | PAGE_MAPPING_KSM);
rcu_read_lock();
if (page->mapping != expected_mapping)
goto stale;
if (!ge... | DoS | 0 | static struct page *get_ksm_page(struct stable_node *stable_node)
{
struct page *page;
void *expected_mapping;
page = pfn_to_page(stable_node->kpfn);
expected_mapping = (void *)stable_node +
(PAGE_MAPPING_ANON | PAGE_MAPPING_KSM);
rcu_read_lock();
if (page->mapping != expected_mapping)
goto stale;
if (!ge... | @@ -1302,6 +1302,12 @@ static struct rmap_item *scan_get_next_rmap_item(struct page **page)
slot = list_entry(slot->mm_list.next, struct mm_slot, mm_list);
ksm_scan.mm_slot = slot;
spin_unlock(&ksm_mmlist_lock);
+ /*
+ * Although we tested list_empty() above, a racing __ksm_exit
+ * of the last mm on the ... | CWE-362 | null | null |
21,794 | static struct page *get_mergeable_page(struct rmap_item *rmap_item)
{
struct mm_struct *mm = rmap_item->mm;
unsigned long addr = rmap_item->address;
struct vm_area_struct *vma;
struct page *page;
down_read(&mm->mmap_sem);
if (ksm_test_exit(mm))
goto out;
vma = find_vma(mm, addr);
if (!vma || vma->vm_start > ... | DoS | 0 | static struct page *get_mergeable_page(struct rmap_item *rmap_item)
{
struct mm_struct *mm = rmap_item->mm;
unsigned long addr = rmap_item->address;
struct vm_area_struct *vma;
struct page *page;
down_read(&mm->mmap_sem);
if (ksm_test_exit(mm))
goto out;
vma = find_vma(mm, addr);
if (!vma || vma->vm_start > ... | @@ -1302,6 +1302,12 @@ static struct rmap_item *scan_get_next_rmap_item(struct page **page)
slot = list_entry(slot->mm_list.next, struct mm_slot, mm_list);
ksm_scan.mm_slot = slot;
spin_unlock(&ksm_mmlist_lock);
+ /*
+ * Although we tested list_empty() above, a racing __ksm_exit
+ * of the last mm on the ... | CWE-362 | null | null |
21,795 | static struct rmap_item *get_next_rmap_item(struct mm_slot *mm_slot,
struct rmap_item **rmap_list,
unsigned long addr)
{
struct rmap_item *rmap_item;
while (*rmap_list) {
rmap_item = *rmap_list;
if ((rmap_item->address & PAGE_MASK) == addr)
return rmap_item;
if (rmap_item->address > addr)
... | DoS | 0 | static struct rmap_item *get_next_rmap_item(struct mm_slot *mm_slot,
struct rmap_item **rmap_list,
unsigned long addr)
{
struct rmap_item *rmap_item;
while (*rmap_list) {
rmap_item = *rmap_list;
if ((rmap_item->address & PAGE_MASK) == addr)
return rmap_item;
if (rmap_item->address > addr)
... | @@ -1302,6 +1302,12 @@ static struct rmap_item *scan_get_next_rmap_item(struct page **page)
slot = list_entry(slot->mm_list.next, struct mm_slot, mm_list);
ksm_scan.mm_slot = slot;
spin_unlock(&ksm_mmlist_lock);
+ /*
+ * Although we tested list_empty() above, a racing __ksm_exit
+ * of the last mm on the ... | CWE-362 | null | null |
21,796 | static inline int in_stable_tree(struct rmap_item *rmap_item)
{
return rmap_item->address & STABLE_FLAG;
}
| DoS | 0 | static inline int in_stable_tree(struct rmap_item *rmap_item)
{
return rmap_item->address & STABLE_FLAG;
}
| @@ -1302,6 +1302,12 @@ static struct rmap_item *scan_get_next_rmap_item(struct page **page)
slot = list_entry(slot->mm_list.next, struct mm_slot, mm_list);
ksm_scan.mm_slot = slot;
spin_unlock(&ksm_mmlist_lock);
+ /*
+ * Although we tested list_empty() above, a racing __ksm_exit
+ * of the last mm on the ... | CWE-362 | null | null |
21,797 | static void insert_to_mm_slots_hash(struct mm_struct *mm,
struct mm_slot *mm_slot)
{
struct hlist_head *bucket;
bucket = &mm_slots_hash[hash_ptr(mm, MM_SLOTS_HASH_SHIFT)];
mm_slot->mm = mm;
hlist_add_head(&mm_slot->link, bucket);
}
| DoS | 0 | static void insert_to_mm_slots_hash(struct mm_struct *mm,
struct mm_slot *mm_slot)
{
struct hlist_head *bucket;
bucket = &mm_slots_hash[hash_ptr(mm, MM_SLOTS_HASH_SHIFT)];
mm_slot->mm = mm;
hlist_add_head(&mm_slot->link, bucket);
}
| @@ -1302,6 +1302,12 @@ static struct rmap_item *scan_get_next_rmap_item(struct page **page)
slot = list_entry(slot->mm_list.next, struct mm_slot, mm_list);
ksm_scan.mm_slot = slot;
spin_unlock(&ksm_mmlist_lock);
+ /*
+ * Although we tested list_empty() above, a racing __ksm_exit
+ * of the last mm on the ... | CWE-362 | null | null |
21,798 | static struct stable_node *ksm_check_stable_tree(unsigned long start_pfn,
unsigned long end_pfn)
{
struct rb_node *node;
for (node = rb_first(&root_stable_tree); node; node = rb_next(node)) {
struct stable_node *stable_node;
stable_node = rb_entry(node, struct stable_node, node);
if (stable_node->kpfn ... | DoS | 0 | static struct stable_node *ksm_check_stable_tree(unsigned long start_pfn,
unsigned long end_pfn)
{
struct rb_node *node;
for (node = rb_first(&root_stable_tree); node; node = rb_next(node)) {
struct stable_node *stable_node;
stable_node = rb_entry(node, struct stable_node, node);
if (stable_node->kpfn ... | @@ -1302,6 +1302,12 @@ static struct rmap_item *scan_get_next_rmap_item(struct page **page)
slot = list_entry(slot->mm_list.next, struct mm_slot, mm_list);
ksm_scan.mm_slot = slot;
spin_unlock(&ksm_mmlist_lock);
+ /*
+ * Although we tested list_empty() above, a racing __ksm_exit
+ * of the last mm on the ... | CWE-362 | null | null |
21,799 | static void ksm_do_scan(unsigned int scan_npages)
{
struct rmap_item *rmap_item;
struct page *uninitialized_var(page);
while (scan_npages-- && likely(!freezing(current))) {
cond_resched();
rmap_item = scan_get_next_rmap_item(&page);
if (!rmap_item)
return;
if (!PageKsm(page) || !in_stable_tree(rmap_item)... | DoS | 0 | static void ksm_do_scan(unsigned int scan_npages)
{
struct rmap_item *rmap_item;
struct page *uninitialized_var(page);
while (scan_npages-- && likely(!freezing(current))) {
cond_resched();
rmap_item = scan_get_next_rmap_item(&page);
if (!rmap_item)
return;
if (!PageKsm(page) || !in_stable_tree(rmap_item)... | @@ -1302,6 +1302,12 @@ static struct rmap_item *scan_get_next_rmap_item(struct page **page)
slot = list_entry(slot->mm_list.next, struct mm_slot, mm_list);
ksm_scan.mm_slot = slot;
spin_unlock(&ksm_mmlist_lock);
+ /*
+ * Although we tested list_empty() above, a racing __ksm_exit
+ * of the last mm on the ... | CWE-362 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.