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,500 | static int proc_self_readlink(struct dentry *dentry, char __user *buffer,
int buflen)
{
struct pid_namespace *ns = dentry->d_sb->s_fs_info;
pid_t tgid = task_tgid_nr_ns(current, ns);
char tmp[PROC_NUMBUF];
if (!tgid)
return -ENOENT;
sprintf(tmp, "%d", tgid);
return vfs_readlink(dentry,buffer,buflen,tmp... | null | 0 | static int proc_self_readlink(struct dentry *dentry, char __user *buffer,
int buflen)
{
struct pid_namespace *ns = dentry->d_sb->s_fs_info;
pid_t tgid = task_tgid_nr_ns(current, ns);
char tmp[PROC_NUMBUF];
if (!tgid)
return -ENOENT;
sprintf(tmp, "%d", tgid);
return vfs_readlink(dentry,buffer,buflen,tmp... | @@ -2708,6 +2708,9 @@ static int do_io_accounting(struct task_struct *task, char *buffer, int whole)
struct task_io_accounting acct = task->ioac;
unsigned long flags;
+ if (!ptrace_may_access(task, PTRACE_MODE_READ))
+ return -EACCES;
+
if (whole && lock_task_sighand(task, &flags)) {
struct task_struct *t =... | CWE-264 | null | null |
21,501 | static ssize_t proc_sessionid_read(struct file * file, char __user * buf,
size_t count, loff_t *ppos)
{
struct inode * inode = file->f_path.dentry->d_inode;
struct task_struct *task = get_proc_task(inode);
ssize_t length;
char tmpbuf[TMPBUFLEN];
if (!task)
return -ESRCH;
length = scnprintf(tmpbuf, TMPBUF... | null | 0 | static ssize_t proc_sessionid_read(struct file * file, char __user * buf,
size_t count, loff_t *ppos)
{
struct inode * inode = file->f_path.dentry->d_inode;
struct task_struct *task = get_proc_task(inode);
ssize_t length;
char tmpbuf[TMPBUFLEN];
if (!task)
return -ESRCH;
length = scnprintf(tmpbuf, TMPBUF... | @@ -2708,6 +2708,9 @@ static int do_io_accounting(struct task_struct *task, char *buffer, int whole)
struct task_io_accounting acct = task->ioac;
unsigned long flags;
+ if (!ptrace_may_access(task, PTRACE_MODE_READ))
+ return -EACCES;
+
if (whole && lock_task_sighand(task, &flags)) {
struct task_struct *t =... | CWE-264 | null | null |
21,502 | int proc_setattr(struct dentry *dentry, struct iattr *attr)
{
int error;
struct inode *inode = dentry->d_inode;
if (attr->ia_valid & ATTR_MODE)
return -EPERM;
error = inode_change_ok(inode, attr);
if (error)
return error;
if ((attr->ia_valid & ATTR_SIZE) &&
attr->ia_size != i_size_read(inode)) {
err... | null | 0 | int proc_setattr(struct dentry *dentry, struct iattr *attr)
{
int error;
struct inode *inode = dentry->d_inode;
if (attr->ia_valid & ATTR_MODE)
return -EPERM;
error = inode_change_ok(inode, attr);
if (error)
return error;
if ((attr->ia_valid & ATTR_SIZE) &&
attr->ia_size != i_size_read(inode)) {
err... | @@ -2708,6 +2708,9 @@ static int do_io_accounting(struct task_struct *task, char *buffer, int whole)
struct task_io_accounting acct = task->ioac;
unsigned long flags;
+ if (!ptrace_may_access(task, PTRACE_MODE_READ))
+ return -EACCES;
+
if (whole && lock_task_sighand(task, &flags)) {
struct task_struct *t =... | CWE-264 | null | null |
21,503 | static int proc_single_open(struct inode *inode, struct file *filp)
{
return single_open(filp, proc_single_show, inode);
}
| null | 0 | static int proc_single_open(struct inode *inode, struct file *filp)
{
return single_open(filp, proc_single_show, inode);
}
| @@ -2708,6 +2708,9 @@ static int do_io_accounting(struct task_struct *task, char *buffer, int whole)
struct task_io_accounting acct = task->ioac;
unsigned long flags;
+ if (!ptrace_may_access(task, PTRACE_MODE_READ))
+ return -EACCES;
+
if (whole && lock_task_sighand(task, &flags)) {
struct task_struct *t =... | CWE-264 | null | null |
21,504 | static int proc_single_show(struct seq_file *m, void *v)
{
struct inode *inode = m->private;
struct pid_namespace *ns;
struct pid *pid;
struct task_struct *task;
int ret;
ns = inode->i_sb->s_fs_info;
pid = proc_pid(inode);
task = get_pid_task(pid, PIDTYPE_PID);
if (!task)
return -ESRCH;
ret = PROC_I(inode... | null | 0 | static int proc_single_show(struct seq_file *m, void *v)
{
struct inode *inode = m->private;
struct pid_namespace *ns;
struct pid *pid;
struct task_struct *task;
int ret;
ns = inode->i_sb->s_fs_info;
pid = proc_pid(inode);
task = get_pid_task(pid, PIDTYPE_PID);
if (!task)
return -ESRCH;
ret = PROC_I(inode... | @@ -2708,6 +2708,9 @@ static int do_io_accounting(struct task_struct *task, char *buffer, int whole)
struct task_io_accounting acct = task->ioac;
unsigned long flags;
+ if (!ptrace_may_access(task, PTRACE_MODE_READ))
+ return -EACCES;
+
if (whole && lock_task_sighand(task, &flags)) {
struct task_struct *t =... | CWE-264 | null | null |
21,505 | static int proc_task_fill_cache(struct file *filp, void *dirent, filldir_t filldir,
struct task_struct *task, int tid)
{
char name[PROC_NUMBUF];
int len = snprintf(name, sizeof(name), "%d", tid);
return proc_fill_cache(filp, dirent, filldir, name, len,
proc_task_instantiate, task, NULL);
}
| null | 0 | static int proc_task_fill_cache(struct file *filp, void *dirent, filldir_t filldir,
struct task_struct *task, int tid)
{
char name[PROC_NUMBUF];
int len = snprintf(name, sizeof(name), "%d", tid);
return proc_fill_cache(filp, dirent, filldir, name, len,
proc_task_instantiate, task, NULL);
}
| @@ -2708,6 +2708,9 @@ static int do_io_accounting(struct task_struct *task, char *buffer, int whole)
struct task_io_accounting acct = task->ioac;
unsigned long flags;
+ if (!ptrace_may_access(task, PTRACE_MODE_READ))
+ return -EACCES;
+
if (whole && lock_task_sighand(task, &flags)) {
struct task_struct *t =... | CWE-264 | null | null |
21,506 | static int proc_task_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
{
struct inode *inode = dentry->d_inode;
struct task_struct *p = get_proc_task(inode);
generic_fillattr(inode, stat);
if (p) {
stat->nlink += get_nr_threads(p);
put_task_struct(p);
}
return 0;
}
| null | 0 | static int proc_task_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
{
struct inode *inode = dentry->d_inode;
struct task_struct *p = get_proc_task(inode);
generic_fillattr(inode, stat);
if (p) {
stat->nlink += get_nr_threads(p);
put_task_struct(p);
}
return 0;
}
| @@ -2708,6 +2708,9 @@ static int do_io_accounting(struct task_struct *task, char *buffer, int whole)
struct task_io_accounting acct = task->ioac;
unsigned long flags;
+ if (!ptrace_may_access(task, PTRACE_MODE_READ))
+ return -EACCES;
+
if (whole && lock_task_sighand(task, &flags)) {
struct task_struct *t =... | CWE-264 | null | null |
21,507 | static struct dentry *proc_task_instantiate(struct inode *dir,
struct dentry *dentry, struct task_struct *task, const void *ptr)
{
struct dentry *error = ERR_PTR(-ENOENT);
struct inode *inode;
inode = proc_pid_make_inode(dir->i_sb, task);
if (!inode)
goto out;
inode->i_mode = S_IFDIR|S_IRUGO|S_IXUGO;
inode->i... | null | 0 | static struct dentry *proc_task_instantiate(struct inode *dir,
struct dentry *dentry, struct task_struct *task, const void *ptr)
{
struct dentry *error = ERR_PTR(-ENOENT);
struct inode *inode;
inode = proc_pid_make_inode(dir->i_sb, task);
if (!inode)
goto out;
inode->i_mode = S_IFDIR|S_IRUGO|S_IXUGO;
inode->i... | @@ -2708,6 +2708,9 @@ static int do_io_accounting(struct task_struct *task, char *buffer, int whole)
struct task_io_accounting acct = task->ioac;
unsigned long flags;
+ if (!ptrace_may_access(task, PTRACE_MODE_READ))
+ return -EACCES;
+
if (whole && lock_task_sighand(task, &flags)) {
struct task_struct *t =... | CWE-264 | null | null |
21,508 | static struct dentry *proc_task_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd)
{
struct dentry *result = ERR_PTR(-ENOENT);
struct task_struct *task;
struct task_struct *leader = get_proc_task(dir);
unsigned tid;
struct pid_namespace *ns;
if (!leader)
goto out_no_task;
tid = name_to_i... | null | 0 | static struct dentry *proc_task_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd)
{
struct dentry *result = ERR_PTR(-ENOENT);
struct task_struct *task;
struct task_struct *leader = get_proc_task(dir);
unsigned tid;
struct pid_namespace *ns;
if (!leader)
goto out_no_task;
tid = name_to_i... | @@ -2708,6 +2708,9 @@ static int do_io_accounting(struct task_struct *task, char *buffer, int whole)
struct task_io_accounting acct = task->ioac;
unsigned long flags;
+ if (!ptrace_may_access(task, PTRACE_MODE_READ))
+ return -EACCES;
+
if (whole && lock_task_sighand(task, &flags)) {
struct task_struct *t =... | CWE-264 | null | null |
21,509 | static struct dentry *proc_tgid_base_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd){
return proc_pident_lookup(dir, dentry,
tgid_base_stuff, ARRAY_SIZE(tgid_base_stuff));
}
| null | 0 | static struct dentry *proc_tgid_base_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd){
return proc_pident_lookup(dir, dentry,
tgid_base_stuff, ARRAY_SIZE(tgid_base_stuff));
}
| @@ -2708,6 +2708,9 @@ static int do_io_accounting(struct task_struct *task, char *buffer, int whole)
struct task_io_accounting acct = task->ioac;
unsigned long flags;
+ if (!ptrace_may_access(task, PTRACE_MODE_READ))
+ return -EACCES;
+
if (whole && lock_task_sighand(task, &flags)) {
struct task_struct *t =... | CWE-264 | null | null |
21,510 | static int proc_tgid_base_readdir(struct file * filp,
void * dirent, filldir_t filldir)
{
return proc_pident_readdir(filp,dirent,filldir,
tgid_base_stuff,ARRAY_SIZE(tgid_base_stuff));
}
| null | 0 | static int proc_tgid_base_readdir(struct file * filp,
void * dirent, filldir_t filldir)
{
return proc_pident_readdir(filp,dirent,filldir,
tgid_base_stuff,ARRAY_SIZE(tgid_base_stuff));
}
| @@ -2708,6 +2708,9 @@ static int do_io_accounting(struct task_struct *task, char *buffer, int whole)
struct task_io_accounting acct = task->ioac;
unsigned long flags;
+ if (!ptrace_may_access(task, PTRACE_MODE_READ))
+ return -EACCES;
+
if (whole && lock_task_sighand(task, &flags)) {
struct task_struct *t =... | CWE-264 | null | null |
21,511 | static int proc_tgid_io_accounting(struct task_struct *task, char *buffer)
{
return do_io_accounting(task, buffer, 1);
}
| null | 0 | static int proc_tgid_io_accounting(struct task_struct *task, char *buffer)
{
return do_io_accounting(task, buffer, 1);
}
| @@ -2708,6 +2708,9 @@ static int do_io_accounting(struct task_struct *task, char *buffer, int whole)
struct task_io_accounting acct = task->ioac;
unsigned long flags;
+ if (!ptrace_may_access(task, PTRACE_MODE_READ))
+ return -EACCES;
+
if (whole && lock_task_sighand(task, &flags)) {
struct task_struct *t =... | CWE-264 | null | null |
21,512 | static struct dentry *proc_tid_base_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd){
return proc_pident_lookup(dir, dentry,
tid_base_stuff, ARRAY_SIZE(tid_base_stuff));
}
| null | 0 | static struct dentry *proc_tid_base_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd){
return proc_pident_lookup(dir, dentry,
tid_base_stuff, ARRAY_SIZE(tid_base_stuff));
}
| @@ -2708,6 +2708,9 @@ static int do_io_accounting(struct task_struct *task, char *buffer, int whole)
struct task_io_accounting acct = task->ioac;
unsigned long flags;
+ if (!ptrace_may_access(task, PTRACE_MODE_READ))
+ return -EACCES;
+
if (whole && lock_task_sighand(task, &flags)) {
struct task_struct *t =... | CWE-264 | null | null |
21,513 | static int proc_tid_base_readdir(struct file * filp,
void * dirent, filldir_t filldir)
{
return proc_pident_readdir(filp,dirent,filldir,
tid_base_stuff,ARRAY_SIZE(tid_base_stuff));
}
| null | 0 | static int proc_tid_base_readdir(struct file * filp,
void * dirent, filldir_t filldir)
{
return proc_pident_readdir(filp,dirent,filldir,
tid_base_stuff,ARRAY_SIZE(tid_base_stuff));
}
| @@ -2708,6 +2708,9 @@ static int do_io_accounting(struct task_struct *task, char *buffer, int whole)
struct task_io_accounting acct = task->ioac;
unsigned long flags;
+ if (!ptrace_may_access(task, PTRACE_MODE_READ))
+ return -EACCES;
+
if (whole && lock_task_sighand(task, &flags)) {
struct task_struct *t =... | CWE-264 | null | null |
21,514 | static int proc_tid_io_accounting(struct task_struct *task, char *buffer)
{
return do_io_accounting(task, buffer, 0);
}
| null | 0 | static int proc_tid_io_accounting(struct task_struct *task, char *buffer)
{
return do_io_accounting(task, buffer, 0);
}
| @@ -2708,6 +2708,9 @@ static int do_io_accounting(struct task_struct *task, char *buffer, int whole)
struct task_io_accounting acct = task->ioac;
unsigned long flags;
+ if (!ptrace_may_access(task, PTRACE_MODE_READ))
+ return -EACCES;
+
if (whole && lock_task_sighand(task, &flags)) {
struct task_struct *t =... | CWE-264 | null | null |
21,515 | static int sched_autogroup_show(struct seq_file *m, void *v)
{
struct inode *inode = m->private;
struct task_struct *p;
p = get_proc_task(inode);
if (!p)
return -ESRCH;
proc_sched_autogroup_show_task(p, m);
put_task_struct(p);
return 0;
}
| null | 0 | static int sched_autogroup_show(struct seq_file *m, void *v)
{
struct inode *inode = m->private;
struct task_struct *p;
p = get_proc_task(inode);
if (!p)
return -ESRCH;
proc_sched_autogroup_show_task(p, m);
put_task_struct(p);
return 0;
}
| @@ -2708,6 +2708,9 @@ static int do_io_accounting(struct task_struct *task, char *buffer, int whole)
struct task_io_accounting acct = task->ioac;
unsigned long flags;
+ if (!ptrace_may_access(task, PTRACE_MODE_READ))
+ return -EACCES;
+
if (whole && lock_task_sighand(task, &flags)) {
struct task_struct *t =... | CWE-264 | null | null |
21,516 | static int sched_open(struct inode *inode, struct file *filp)
{
return single_open(filp, sched_show, inode);
}
| null | 0 | static int sched_open(struct inode *inode, struct file *filp)
{
return single_open(filp, sched_show, inode);
}
| @@ -2708,6 +2708,9 @@ static int do_io_accounting(struct task_struct *task, char *buffer, int whole)
struct task_io_accounting acct = task->ioac;
unsigned long flags;
+ if (!ptrace_may_access(task, PTRACE_MODE_READ))
+ return -EACCES;
+
if (whole && lock_task_sighand(task, &flags)) {
struct task_struct *t =... | CWE-264 | null | null |
21,517 | static int sched_show(struct seq_file *m, void *v)
{
struct inode *inode = m->private;
struct task_struct *p;
p = get_proc_task(inode);
if (!p)
return -ESRCH;
proc_sched_show_task(p, m);
put_task_struct(p);
return 0;
}
| null | 0 | static int sched_show(struct seq_file *m, void *v)
{
struct inode *inode = m->private;
struct task_struct *p;
p = get_proc_task(inode);
if (!p)
return -ESRCH;
proc_sched_show_task(p, m);
put_task_struct(p);
return 0;
}
| @@ -2708,6 +2708,9 @@ static int do_io_accounting(struct task_struct *task, char *buffer, int whole)
struct task_io_accounting acct = task->ioac;
unsigned long flags;
+ if (!ptrace_may_access(task, PTRACE_MODE_READ))
+ return -EACCES;
+
if (whole && lock_task_sighand(task, &flags)) {
struct task_struct *t =... | CWE-264 | null | null |
21,518 | sched_write(struct file *file, const char __user *buf,
size_t count, loff_t *offset)
{
struct inode *inode = file->f_path.dentry->d_inode;
struct task_struct *p;
p = get_proc_task(inode);
if (!p)
return -ESRCH;
proc_sched_set_task(p);
put_task_struct(p);
return count;
}
| null | 0 | sched_write(struct file *file, const char __user *buf,
size_t count, loff_t *offset)
{
struct inode *inode = file->f_path.dentry->d_inode;
struct task_struct *p;
p = get_proc_task(inode);
if (!p)
return -ESRCH;
proc_sched_set_task(p);
put_task_struct(p);
return count;
}
| @@ -2708,6 +2708,9 @@ static int do_io_accounting(struct task_struct *task, char *buffer, int whole)
struct task_io_accounting acct = task->ioac;
unsigned long flags;
+ if (!ptrace_may_access(task, PTRACE_MODE_READ))
+ return -EACCES;
+
if (whole && lock_task_sighand(task, &flags)) {
struct task_struct *t =... | CWE-264 | null | null |
21,519 | static int task_dumpable(struct task_struct *task)
{
int dumpable = 0;
struct mm_struct *mm;
task_lock(task);
mm = task->mm;
if (mm)
dumpable = get_dumpable(mm);
task_unlock(task);
if(dumpable == 1)
return 1;
return 0;
}
| null | 0 | static int task_dumpable(struct task_struct *task)
{
int dumpable = 0;
struct mm_struct *mm;
task_lock(task);
mm = task->mm;
if (mm)
dumpable = get_dumpable(mm);
task_unlock(task);
if(dumpable == 1)
return 1;
return 0;
}
| @@ -2708,6 +2708,9 @@ static int do_io_accounting(struct task_struct *task, char *buffer, int whole)
struct task_io_accounting acct = task->ioac;
unsigned long flags;
+ if (!ptrace_may_access(task, PTRACE_MODE_READ))
+ return -EACCES;
+
if (whole && lock_task_sighand(task, &flags)) {
struct task_struct *t =... | CWE-264 | null | null |
21,520 | static int cgroupstats_user_cmd(struct sk_buff *skb, struct genl_info *info)
{
int rc = 0;
struct sk_buff *rep_skb;
struct cgroupstats *stats;
struct nlattr *na;
size_t size;
u32 fd;
struct file *file;
int fput_needed;
na = info->attrs[CGROUPSTATS_CMD_ATTR_FD];
if (!na)
return -EINVAL;
fd = nla_get_u32(i... | +Info | 0 | static int cgroupstats_user_cmd(struct sk_buff *skb, struct genl_info *info)
{
int rc = 0;
struct sk_buff *rep_skb;
struct cgroupstats *stats;
struct nlattr *na;
size_t size;
u32 fd;
struct file *file;
int fput_needed;
na = info->attrs[CGROUPSTATS_CMD_ATTR_FD];
if (!na)
return -EINVAL;
fd = nla_get_u32(i... | @@ -655,6 +655,7 @@ static struct genl_ops taskstats_ops = {
.cmd = TASKSTATS_CMD_GET,
.doit = taskstats_user_cmd,
.policy = taskstats_cmd_get_policy,
+ .flags = GENL_ADMIN_PERM,
};
static struct genl_ops cgroupstats_ops = { | CWE-200 | null | null |
21,521 | static int cmd_attr_pid(struct genl_info *info)
{
struct taskstats *stats;
struct sk_buff *rep_skb;
size_t size;
u32 pid;
int rc;
size = taskstats_packet_size();
rc = prepare_reply(info, TASKSTATS_CMD_NEW, &rep_skb, size);
if (rc < 0)
return rc;
rc = -EINVAL;
pid = nla_get_u32(info->attrs[TASKSTATS_CMD_A... | +Info | 0 | static int cmd_attr_pid(struct genl_info *info)
{
struct taskstats *stats;
struct sk_buff *rep_skb;
size_t size;
u32 pid;
int rc;
size = taskstats_packet_size();
rc = prepare_reply(info, TASKSTATS_CMD_NEW, &rep_skb, size);
if (rc < 0)
return rc;
rc = -EINVAL;
pid = nla_get_u32(info->attrs[TASKSTATS_CMD_A... | @@ -655,6 +655,7 @@ static struct genl_ops taskstats_ops = {
.cmd = TASKSTATS_CMD_GET,
.doit = taskstats_user_cmd,
.policy = taskstats_cmd_get_policy,
+ .flags = GENL_ADMIN_PERM,
};
static struct genl_ops cgroupstats_ops = { | CWE-200 | null | null |
21,522 | static int fill_stats_for_tgid(pid_t tgid, struct taskstats *stats)
{
struct task_struct *tsk, *first;
unsigned long flags;
int rc = -ESRCH;
/*
* Add additional stats from live tasks except zombie thread group
* leaders who are already counted with the dead tasks
*/
rcu_read_lock();
first = find_task_by_vp... | +Info | 0 | static int fill_stats_for_tgid(pid_t tgid, struct taskstats *stats)
{
struct task_struct *tsk, *first;
unsigned long flags;
int rc = -ESRCH;
/*
* Add additional stats from live tasks except zombie thread group
* leaders who are already counted with the dead tasks
*/
rcu_read_lock();
first = find_task_by_vp... | @@ -655,6 +655,7 @@ static struct genl_ops taskstats_ops = {
.cmd = TASKSTATS_CMD_GET,
.doit = taskstats_user_cmd,
.policy = taskstats_cmd_get_policy,
+ .flags = GENL_ADMIN_PERM,
};
static struct genl_ops cgroupstats_ops = { | CWE-200 | null | null |
21,523 | static void fill_tgid_exit(struct task_struct *tsk)
{
unsigned long flags;
spin_lock_irqsave(&tsk->sighand->siglock, flags);
if (!tsk->signal->stats)
goto ret;
/*
* Each accounting subsystem calls its functions here to
* accumalate its per-task stats for tsk, into the per-tgid structure
*
* per-task-foo... | +Info | 0 | static void fill_tgid_exit(struct task_struct *tsk)
{
unsigned long flags;
spin_lock_irqsave(&tsk->sighand->siglock, flags);
if (!tsk->signal->stats)
goto ret;
/*
* Each accounting subsystem calls its functions here to
* accumalate its per-task stats for tsk, into the per-tgid structure
*
* per-task-foo... | @@ -655,6 +655,7 @@ static struct genl_ops taskstats_ops = {
.cmd = TASKSTATS_CMD_GET,
.doit = taskstats_user_cmd,
.policy = taskstats_cmd_get_policy,
+ .flags = GENL_ADMIN_PERM,
};
static struct genl_ops cgroupstats_ops = { | CWE-200 | null | null |
21,524 | static struct taskstats *mk_reply(struct sk_buff *skb, int type, u32 pid)
{
struct nlattr *na, *ret;
int aggr;
aggr = (type == TASKSTATS_TYPE_PID)
? TASKSTATS_TYPE_AGGR_PID
: TASKSTATS_TYPE_AGGR_TGID;
/*
* The taskstats structure is internally aligned on 8 byte
* boundaries but the layout of the aggregr... | +Info | 0 | static struct taskstats *mk_reply(struct sk_buff *skb, int type, u32 pid)
{
struct nlattr *na, *ret;
int aggr;
aggr = (type == TASKSTATS_TYPE_PID)
? TASKSTATS_TYPE_AGGR_PID
: TASKSTATS_TYPE_AGGR_TGID;
/*
* The taskstats structure is internally aligned on 8 byte
* boundaries but the layout of the aggregr... | @@ -655,6 +655,7 @@ static struct genl_ops taskstats_ops = {
.cmd = TASKSTATS_CMD_GET,
.doit = taskstats_user_cmd,
.policy = taskstats_cmd_get_policy,
+ .flags = GENL_ADMIN_PERM,
};
static struct genl_ops cgroupstats_ops = { | CWE-200 | null | null |
21,525 | static int parse(struct nlattr *na, struct cpumask *mask)
{
char *data;
int len;
int ret;
if (na == NULL)
return 1;
len = nla_len(na);
if (len > TASKSTATS_CPUMASK_MAXLEN)
return -E2BIG;
if (len < 1)
return -EINVAL;
data = kmalloc(len, GFP_KERNEL);
if (!data)
return -ENOMEM;
nla_strlcpy(data, na, len)... | +Info | 0 | static int parse(struct nlattr *na, struct cpumask *mask)
{
char *data;
int len;
int ret;
if (na == NULL)
return 1;
len = nla_len(na);
if (len > TASKSTATS_CPUMASK_MAXLEN)
return -E2BIG;
if (len < 1)
return -EINVAL;
data = kmalloc(len, GFP_KERNEL);
if (!data)
return -ENOMEM;
nla_strlcpy(data, na, len)... | @@ -655,6 +655,7 @@ static struct genl_ops taskstats_ops = {
.cmd = TASKSTATS_CMD_GET,
.doit = taskstats_user_cmd,
.policy = taskstats_cmd_get_policy,
+ .flags = GENL_ADMIN_PERM,
};
static struct genl_ops cgroupstats_ops = { | CWE-200 | null | null |
21,526 | static void send_cpu_listeners(struct sk_buff *skb,
struct listener_list *listeners)
{
struct genlmsghdr *genlhdr = nlmsg_data(nlmsg_hdr(skb));
struct listener *s, *tmp;
struct sk_buff *skb_next, *skb_cur = skb;
void *reply = genlmsg_data(genlhdr);
int rc, delcount = 0;
rc = genlmsg_end(skb, reply);
if (rc... | +Info | 0 | static void send_cpu_listeners(struct sk_buff *skb,
struct listener_list *listeners)
{
struct genlmsghdr *genlhdr = nlmsg_data(nlmsg_hdr(skb));
struct listener *s, *tmp;
struct sk_buff *skb_next, *skb_cur = skb;
void *reply = genlmsg_data(genlhdr);
int rc, delcount = 0;
rc = genlmsg_end(skb, reply);
if (rc... | @@ -655,6 +655,7 @@ static struct genl_ops taskstats_ops = {
.cmd = TASKSTATS_CMD_GET,
.doit = taskstats_user_cmd,
.policy = taskstats_cmd_get_policy,
+ .flags = GENL_ADMIN_PERM,
};
static struct genl_ops cgroupstats_ops = { | CWE-200 | null | null |
21,527 | static int send_reply(struct sk_buff *skb, struct genl_info *info)
{
struct genlmsghdr *genlhdr = nlmsg_data(nlmsg_hdr(skb));
void *reply = genlmsg_data(genlhdr);
int rc;
rc = genlmsg_end(skb, reply);
if (rc < 0) {
nlmsg_free(skb);
return rc;
}
return genlmsg_reply(skb, info);
}
| +Info | 0 | static int send_reply(struct sk_buff *skb, struct genl_info *info)
{
struct genlmsghdr *genlhdr = nlmsg_data(nlmsg_hdr(skb));
void *reply = genlmsg_data(genlhdr);
int rc;
rc = genlmsg_end(skb, reply);
if (rc < 0) {
nlmsg_free(skb);
return rc;
}
return genlmsg_reply(skb, info);
}
| @@ -655,6 +655,7 @@ static struct genl_ops taskstats_ops = {
.cmd = TASKSTATS_CMD_GET,
.doit = taskstats_user_cmd,
.policy = taskstats_cmd_get_policy,
+ .flags = GENL_ADMIN_PERM,
};
static struct genl_ops cgroupstats_ops = { | CWE-200 | null | null |
21,528 | void taskstats_exit(struct task_struct *tsk, int group_dead)
{
int rc;
struct listener_list *listeners;
struct taskstats *stats;
struct sk_buff *rep_skb;
size_t size;
int is_thread_group;
if (!family_registered)
return;
/*
* Size includes space for nested attributes
*/
size = taskstats_packet_size();
... | +Info | 0 | void taskstats_exit(struct task_struct *tsk, int group_dead)
{
int rc;
struct listener_list *listeners;
struct taskstats *stats;
struct sk_buff *rep_skb;
size_t size;
int is_thread_group;
if (!family_registered)
return;
/*
* Size includes space for nested attributes
*/
size = taskstats_packet_size();
... | @@ -655,6 +655,7 @@ static struct genl_ops taskstats_ops = {
.cmd = TASKSTATS_CMD_GET,
.doit = taskstats_user_cmd,
.policy = taskstats_cmd_get_policy,
+ .flags = GENL_ADMIN_PERM,
};
static struct genl_ops cgroupstats_ops = { | CWE-200 | null | null |
21,529 | void __init taskstats_init_early(void)
{
unsigned int i;
taskstats_cache = KMEM_CACHE(taskstats, SLAB_PANIC);
for_each_possible_cpu(i) {
INIT_LIST_HEAD(&(per_cpu(listener_array, i).list));
init_rwsem(&(per_cpu(listener_array, i).sem));
}
}
| +Info | 0 | void __init taskstats_init_early(void)
{
unsigned int i;
taskstats_cache = KMEM_CACHE(taskstats, SLAB_PANIC);
for_each_possible_cpu(i) {
INIT_LIST_HEAD(&(per_cpu(listener_array, i).list));
init_rwsem(&(per_cpu(listener_array, i).sem));
}
}
| @@ -655,6 +655,7 @@ static struct genl_ops taskstats_ops = {
.cmd = TASKSTATS_CMD_GET,
.doit = taskstats_user_cmd,
.policy = taskstats_cmd_get_policy,
+ .flags = GENL_ADMIN_PERM,
};
static struct genl_ops cgroupstats_ops = { | CWE-200 | null | null |
21,530 | static size_t taskstats_packet_size(void)
{
size_t size;
size = nla_total_size(sizeof(u32)) +
nla_total_size(sizeof(struct taskstats)) + nla_total_size(0);
#ifdef TASKSTATS_NEEDS_PADDING
size += nla_total_size(0); /* Padding for alignment */
#endif
return size;
}
| +Info | 0 | static size_t taskstats_packet_size(void)
{
size_t size;
size = nla_total_size(sizeof(u32)) +
nla_total_size(sizeof(struct taskstats)) + nla_total_size(0);
#ifdef TASKSTATS_NEEDS_PADDING
size += nla_total_size(0); /* Padding for alignment */
#endif
return size;
}
| @@ -655,6 +655,7 @@ static struct genl_ops taskstats_ops = {
.cmd = TASKSTATS_CMD_GET,
.doit = taskstats_user_cmd,
.policy = taskstats_cmd_get_policy,
+ .flags = GENL_ADMIN_PERM,
};
static struct genl_ops cgroupstats_ops = { | CWE-200 | null | null |
21,531 | static struct taskstats *taskstats_tgid_alloc(struct task_struct *tsk)
{
struct signal_struct *sig = tsk->signal;
struct taskstats *stats;
if (sig->stats || thread_group_empty(tsk))
goto ret;
/* No problem if kmem_cache_zalloc() fails */
stats = kmem_cache_zalloc(taskstats_cache, GFP_KERNEL);
spin_lock_irq(&... | +Info | 0 | static struct taskstats *taskstats_tgid_alloc(struct task_struct *tsk)
{
struct signal_struct *sig = tsk->signal;
struct taskstats *stats;
if (sig->stats || thread_group_empty(tsk))
goto ret;
/* No problem if kmem_cache_zalloc() fails */
stats = kmem_cache_zalloc(taskstats_cache, GFP_KERNEL);
spin_lock_irq(&... | @@ -655,6 +655,7 @@ static struct genl_ops taskstats_ops = {
.cmd = TASKSTATS_CMD_GET,
.doit = taskstats_user_cmd,
.policy = taskstats_cmd_get_policy,
+ .flags = GENL_ADMIN_PERM,
};
static struct genl_ops cgroupstats_ops = { | CWE-200 | null | null |
21,532 | static int taskstats_user_cmd(struct sk_buff *skb, struct genl_info *info)
{
if (info->attrs[TASKSTATS_CMD_ATTR_REGISTER_CPUMASK])
return cmd_attr_register_cpumask(info);
else if (info->attrs[TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK])
return cmd_attr_deregister_cpumask(info);
else if (info->attrs[TASKSTATS_CMD_ATTR... | +Info | 0 | static int taskstats_user_cmd(struct sk_buff *skb, struct genl_info *info)
{
if (info->attrs[TASKSTATS_CMD_ATTR_REGISTER_CPUMASK])
return cmd_attr_register_cpumask(info);
else if (info->attrs[TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK])
return cmd_attr_deregister_cpumask(info);
else if (info->attrs[TASKSTATS_CMD_ATTR... | @@ -655,6 +655,7 @@ static struct genl_ops taskstats_ops = {
.cmd = TASKSTATS_CMD_GET,
.doit = taskstats_user_cmd,
.policy = taskstats_cmd_get_policy,
+ .flags = GENL_ADMIN_PERM,
};
static struct genl_ops cgroupstats_ops = { | CWE-200 | null | null |
21,533 | __releases(bitlock)
__acquires(bitlock)
{
struct va_format vaf;
va_list args;
struct ext4_super_block *es = EXT4_SB(sb)->s_es;
es->s_last_error_ino = cpu_to_le32(ino);
es->s_last_error_block = cpu_to_le64(block);
__save_error_info(sb, function, line);
va_start(args, fmt);
vaf.fmt = fmt;
vaf.va = &args;
pri... | DoS | 0 | __releases(bitlock)
__acquires(bitlock)
{
struct va_format vaf;
va_list args;
struct ext4_super_block *es = EXT4_SB(sb)->s_es;
es->s_last_error_ino = cpu_to_le32(ino);
es->s_last_error_block = cpu_to_le64(block);
__save_error_info(sb, function, line);
va_start(args, fmt);
vaf.fmt = fmt;
vaf.va = &args;
pri... | @@ -3391,6 +3391,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
get_random_bytes(&sbi->s_next_generation, sizeof(u32));
spin_lock_init(&sbi->s_next_gen_lock);
+ init_timer(&sbi->s_err_report);
+ sbi->s_err_report.function = print_daily_error_info;
+ sbi->s_err_report.data = (unsi... | null | null | null |
21,534 | static ssize_t delayed_allocation_blocks_show(struct ext4_attr *a,
struct ext4_sb_info *sbi,
char *buf)
{
return snprintf(buf, PAGE_SIZE, "%llu\n",
(s64) percpu_counter_sum(&sbi->s_dirtyblocks_counter));
}
| DoS | 0 | static ssize_t delayed_allocation_blocks_show(struct ext4_attr *a,
struct ext4_sb_info *sbi,
char *buf)
{
return snprintf(buf, PAGE_SIZE, "%llu\n",
(s64) percpu_counter_sum(&sbi->s_dirtyblocks_counter));
}
| @@ -3391,6 +3391,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
get_random_bytes(&sbi->s_next_generation, sizeof(u32));
spin_lock_init(&sbi->s_next_gen_lock);
+ init_timer(&sbi->s_err_report);
+ sbi->s_err_report.function = print_daily_error_info;
+ sbi->s_err_report.data = (unsi... | null | null | null |
21,535 | static int ext4_check_descriptors(struct super_block *sb,
ext4_group_t *first_not_zeroed)
{
struct ext4_sb_info *sbi = EXT4_SB(sb);
ext4_fsblk_t first_block = le32_to_cpu(sbi->s_es->s_first_data_block);
ext4_fsblk_t last_block;
ext4_fsblk_t block_bitmap;
ext4_fsblk_t inode_bitmap;
ext4_fsblk_t inode_table;
... | DoS | 0 | static int ext4_check_descriptors(struct super_block *sb,
ext4_group_t *first_not_zeroed)
{
struct ext4_sb_info *sbi = EXT4_SB(sb);
ext4_fsblk_t first_block = le32_to_cpu(sbi->s_es->s_first_data_block);
ext4_fsblk_t last_block;
ext4_fsblk_t block_bitmap;
ext4_fsblk_t inode_bitmap;
ext4_fsblk_t inode_table;
... | @@ -3391,6 +3391,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
get_random_bytes(&sbi->s_next_generation, sizeof(u32));
spin_lock_init(&sbi->s_next_gen_lock);
+ init_timer(&sbi->s_err_report);
+ sbi->s_err_report.function = print_daily_error_info;
+ sbi->s_err_report.data = (unsi... | null | null | null |
21,536 | static void ext4_destroy_inode(struct inode *inode)
{
ext4_ioend_wait(inode);
if (!list_empty(&(EXT4_I(inode)->i_orphan))) {
ext4_msg(inode->i_sb, KERN_ERR,
"Inode %lu (%p): orphan list check failed!",
inode->i_ino, EXT4_I(inode));
print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS, 16, 4,
EXT4_I(inode... | DoS | 0 | static void ext4_destroy_inode(struct inode *inode)
{
ext4_ioend_wait(inode);
if (!list_empty(&(EXT4_I(inode)->i_orphan))) {
ext4_msg(inode->i_sb, KERN_ERR,
"Inode %lu (%p): orphan list check failed!",
inode->i_ino, EXT4_I(inode));
print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS, 16, 4,
EXT4_I(inode... | @@ -3391,6 +3391,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
get_random_bytes(&sbi->s_next_generation, sizeof(u32));
spin_lock_init(&sbi->s_next_gen_lock);
+ init_timer(&sbi->s_err_report);
+ sbi->s_err_report.function = print_daily_error_info;
+ sbi->s_err_report.data = (unsi... | null | null | null |
21,537 | static int ext4_feature_set_ok(struct super_block *sb, int readonly)
{
if (EXT4_HAS_INCOMPAT_FEATURE(sb, ~EXT4_FEATURE_INCOMPAT_SUPP)) {
ext4_msg(sb, KERN_ERR,
"Couldn't mount because of "
"unsupported optional features (%x)",
(le32_to_cpu(EXT4_SB(sb)->s_es->s_feature_incompat) &
~EXT4_FEATURE_INCOMPAT_S... | DoS | 0 | static int ext4_feature_set_ok(struct super_block *sb, int readonly)
{
if (EXT4_HAS_INCOMPAT_FEATURE(sb, ~EXT4_FEATURE_INCOMPAT_SUPP)) {
ext4_msg(sb, KERN_ERR,
"Couldn't mount because of "
"unsupported optional features (%x)",
(le32_to_cpu(EXT4_SB(sb)->s_es->s_feature_incompat) &
~EXT4_FEATURE_INCOMPAT_S... | @@ -3391,6 +3391,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
get_random_bytes(&sbi->s_next_generation, sizeof(u32));
spin_lock_init(&sbi->s_next_gen_lock);
+ init_timer(&sbi->s_err_report);
+ sbi->s_err_report.function = print_daily_error_info;
+ sbi->s_err_report.data = (unsi... | null | null | null |
21,538 | static int ext4_fill_flex_info(struct super_block *sb)
{
struct ext4_sb_info *sbi = EXT4_SB(sb);
struct ext4_group_desc *gdp = NULL;
ext4_group_t flex_group_count;
ext4_group_t flex_group;
int groups_per_flex = 0;
size_t size;
int i;
sbi->s_log_groups_per_flex = sbi->s_es->s_log_groups_per_flex;
groups_per_fl... | DoS | 0 | static int ext4_fill_flex_info(struct super_block *sb)
{
struct ext4_sb_info *sbi = EXT4_SB(sb);
struct ext4_group_desc *gdp = NULL;
ext4_group_t flex_group_count;
ext4_group_t flex_group;
int groups_per_flex = 0;
size_t size;
int i;
sbi->s_log_groups_per_flex = sbi->s_es->s_log_groups_per_flex;
groups_per_fl... | @@ -3391,6 +3391,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
get_random_bytes(&sbi->s_next_generation, sizeof(u32));
spin_lock_init(&sbi->s_next_gen_lock);
+ init_timer(&sbi->s_err_report);
+ sbi->s_err_report.function = print_daily_error_info;
+ sbi->s_err_report.data = (unsi... | null | null | null |
21,539 | __u32 ext4_free_blks_count(struct super_block *sb,
struct ext4_group_desc *bg)
{
return le16_to_cpu(bg->bg_free_blocks_count_lo) |
(EXT4_DESC_SIZE(sb) >= EXT4_MIN_DESC_SIZE_64BIT ?
(__u32)le16_to_cpu(bg->bg_free_blocks_count_hi) << 16 : 0);
}
| DoS | 0 | __u32 ext4_free_blks_count(struct super_block *sb,
struct ext4_group_desc *bg)
{
return le16_to_cpu(bg->bg_free_blocks_count_lo) |
(EXT4_DESC_SIZE(sb) >= EXT4_MIN_DESC_SIZE_64BIT ?
(__u32)le16_to_cpu(bg->bg_free_blocks_count_hi) << 16 : 0);
}
| @@ -3391,6 +3391,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
get_random_bytes(&sbi->s_next_generation, sizeof(u32));
spin_lock_init(&sbi->s_next_gen_lock);
+ init_timer(&sbi->s_err_report);
+ sbi->s_err_report.function = print_daily_error_info;
+ sbi->s_err_report.data = (unsi... | null | null | null |
21,540 | void ext4_free_blks_set(struct super_block *sb,
struct ext4_group_desc *bg, __u32 count)
{
bg->bg_free_blocks_count_lo = cpu_to_le16((__u16)count);
if (EXT4_DESC_SIZE(sb) >= EXT4_MIN_DESC_SIZE_64BIT)
bg->bg_free_blocks_count_hi = cpu_to_le16(count >> 16);
}
| DoS | 0 | void ext4_free_blks_set(struct super_block *sb,
struct ext4_group_desc *bg, __u32 count)
{
bg->bg_free_blocks_count_lo = cpu_to_le16((__u16)count);
if (EXT4_DESC_SIZE(sb) >= EXT4_MIN_DESC_SIZE_64BIT)
bg->bg_free_blocks_count_hi = cpu_to_le16(count >> 16);
}
| @@ -3391,6 +3391,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
get_random_bytes(&sbi->s_next_generation, sizeof(u32));
spin_lock_init(&sbi->s_next_gen_lock);
+ init_timer(&sbi->s_err_report);
+ sbi->s_err_report.function = print_daily_error_info;
+ sbi->s_err_report.data = (unsi... | null | null | null |
21,541 | static unsigned long ext4_get_stripe_size(struct ext4_sb_info *sbi)
{
unsigned long stride = le16_to_cpu(sbi->s_es->s_raid_stride);
unsigned long stripe_width =
le32_to_cpu(sbi->s_es->s_raid_stripe_width);
if (sbi->s_stripe && sbi->s_stripe <= sbi->s_blocks_per_group)
return sbi->s_stripe;
if (stripe_width <... | DoS | 0 | static unsigned long ext4_get_stripe_size(struct ext4_sb_info *sbi)
{
unsigned long stride = le16_to_cpu(sbi->s_es->s_raid_stride);
unsigned long stripe_width =
le32_to_cpu(sbi->s_es->s_raid_stripe_width);
if (sbi->s_stripe && sbi->s_stripe <= sbi->s_blocks_per_group)
return sbi->s_stripe;
if (stripe_width <... | @@ -3391,6 +3391,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
get_random_bytes(&sbi->s_next_generation, sizeof(u32));
spin_lock_init(&sbi->s_next_gen_lock);
+ init_timer(&sbi->s_err_report);
+ sbi->s_err_report.function = print_daily_error_info;
+ sbi->s_err_report.data = (unsi... | null | null | null |
21,542 | static int __init ext4_init_fs(void)
{
int i, err;
ext4_check_flag_values();
for (i = 0; i < EXT4_WQ_HASH_SZ; i++) {
mutex_init(&ext4__aio_mutex[i]);
init_waitqueue_head(&ext4__ioend_wq[i]);
}
err = ext4_init_pageio();
if (err)
return err;
err = ext4_init_system_zone();
if (err)
goto out7;
ext4_kset... | DoS | 0 | static int __init ext4_init_fs(void)
{
int i, err;
ext4_check_flag_values();
for (i = 0; i < EXT4_WQ_HASH_SZ; i++) {
mutex_init(&ext4__aio_mutex[i]);
init_waitqueue_head(&ext4__ioend_wq[i]);
}
err = ext4_init_pageio();
if (err)
return err;
err = ext4_init_system_zone();
if (err)
goto out7;
ext4_kset... | @@ -3391,6 +3391,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
get_random_bytes(&sbi->s_next_generation, sizeof(u32));
spin_lock_init(&sbi->s_next_gen_lock);
+ init_timer(&sbi->s_err_report);
+ sbi->s_err_report.function = print_daily_error_info;
+ sbi->s_err_report.data = (unsi... | null | null | null |
21,543 | handle_t *ext4_journal_start_sb(struct super_block *sb, int nblocks)
{
journal_t *journal;
if (sb->s_flags & MS_RDONLY)
return ERR_PTR(-EROFS);
vfs_check_frozen(sb, SB_FREEZE_TRANS);
/* Special case here: if the journal has aborted behind our
* backs (eg. EIO in the commit thread), then we still need to
* t... | DoS | 0 | handle_t *ext4_journal_start_sb(struct super_block *sb, int nblocks)
{
journal_t *journal;
if (sb->s_flags & MS_RDONLY)
return ERR_PTR(-EROFS);
vfs_check_frozen(sb, SB_FREEZE_TRANS);
/* Special case here: if the journal has aborted behind our
* backs (eg. EIO in the commit thread), then we still need to
* t... | @@ -3391,6 +3391,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
get_random_bytes(&sbi->s_next_generation, sizeof(u32));
spin_lock_init(&sbi->s_next_gen_lock);
+ init_timer(&sbi->s_err_report);
+ sbi->s_err_report.function = print_daily_error_info;
+ sbi->s_err_report.data = (unsi... | null | null | null |
21,544 | static void ext4_lazyinode_timeout(unsigned long data)
{
struct task_struct *p = (struct task_struct *)data;
wake_up_process(p);
}
| DoS | 0 | static void ext4_lazyinode_timeout(unsigned long data)
{
struct task_struct *p = (struct task_struct *)data;
wake_up_process(p);
}
| @@ -3391,6 +3391,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
get_random_bytes(&sbi->s_next_generation, sizeof(u32));
spin_lock_init(&sbi->s_next_gen_lock);
+ init_timer(&sbi->s_err_report);
+ sbi->s_err_report.function = print_daily_error_info;
+ sbi->s_err_report.data = (unsi... | null | null | null |
21,545 | static loff_t ext4_max_size(int blkbits, int has_huge_files)
{
loff_t res;
loff_t upper_limit = MAX_LFS_FILESIZE;
/* small i_blocks in vfs inode? */
if (!has_huge_files || sizeof(blkcnt_t) < sizeof(u64)) {
/*
* CONFIG_LBDAF is not enabled implies the inode
* i_block represent total blocks in 512 bytes
*... | DoS | 0 | static loff_t ext4_max_size(int blkbits, int has_huge_files)
{
loff_t res;
loff_t upper_limit = MAX_LFS_FILESIZE;
/* small i_blocks in vfs inode? */
if (!has_huge_files || sizeof(blkcnt_t) < sizeof(u64)) {
/*
* CONFIG_LBDAF is not enabled implies the inode
* i_block represent total blocks in 512 bytes
*... | @@ -3391,6 +3391,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
get_random_bytes(&sbi->s_next_generation, sizeof(u32));
spin_lock_init(&sbi->s_next_gen_lock);
+ init_timer(&sbi->s_err_report);
+ sbi->s_err_report.function = print_daily_error_info;
+ sbi->s_err_report.data = (unsi... | null | null | null |
21,546 | static void ext4_put_super(struct super_block *sb)
{
struct ext4_sb_info *sbi = EXT4_SB(sb);
struct ext4_super_block *es = sbi->s_es;
int i, err;
ext4_unregister_li_request(sb);
dquot_disable(sb, -1, DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED);
flush_workqueue(sbi->dio_unwritten_wq);
destroy_workqueue(sbi->dio... | DoS | 0 | static void ext4_put_super(struct super_block *sb)
{
struct ext4_sb_info *sbi = EXT4_SB(sb);
struct ext4_super_block *es = sbi->s_es;
int i, err;
ext4_unregister_li_request(sb);
dquot_disable(sb, -1, DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED);
flush_workqueue(sbi->dio_unwritten_wq);
destroy_workqueue(sbi->dio... | @@ -3391,6 +3391,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
get_random_bytes(&sbi->s_next_generation, sizeof(u32));
spin_lock_init(&sbi->s_next_gen_lock);
+ init_timer(&sbi->s_err_report);
+ sbi->s_err_report.function = print_daily_error_info;
+ sbi->s_err_report.data = (unsi... | null | null | null |
21,547 | static int ext4_remount(struct super_block *sb, int *flags, char *data)
{
struct ext4_super_block *es;
struct ext4_sb_info *sbi = EXT4_SB(sb);
ext4_fsblk_t n_blocks_count = 0;
unsigned long old_sb_flags;
struct ext4_mount_options old_opts;
int enable_quota = 0;
ext4_group_t g;
unsigned int journal_ioprio = DEFA... | DoS | 0 | static int ext4_remount(struct super_block *sb, int *flags, char *data)
{
struct ext4_super_block *es;
struct ext4_sb_info *sbi = EXT4_SB(sb);
ext4_fsblk_t n_blocks_count = 0;
unsigned long old_sb_flags;
struct ext4_mount_options old_opts;
int enable_quota = 0;
ext4_group_t g;
unsigned int journal_ioprio = DEFA... | @@ -3391,6 +3391,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
get_random_bytes(&sbi->s_next_generation, sizeof(u32));
spin_lock_init(&sbi->s_next_gen_lock);
+ init_timer(&sbi->s_err_report);
+ sbi->s_err_report.function = print_daily_error_info;
+ sbi->s_err_report.data = (unsi... | null | null | null |
21,548 | static int ext4_run_lazyinit_thread(void)
{
ext4_lazyinit_task = kthread_run(ext4_lazyinit_thread,
ext4_li_info, "ext4lazyinit");
if (IS_ERR(ext4_lazyinit_task)) {
int err = PTR_ERR(ext4_lazyinit_task);
ext4_clear_request_list();
del_timer_sync(&ext4_li_info->li_timer);
kfree(ext4_li_info);
ext4_li_in... | DoS | 0 | static int ext4_run_lazyinit_thread(void)
{
ext4_lazyinit_task = kthread_run(ext4_lazyinit_thread,
ext4_li_info, "ext4lazyinit");
if (IS_ERR(ext4_lazyinit_task)) {
int err = PTR_ERR(ext4_lazyinit_task);
ext4_clear_request_list();
del_timer_sync(&ext4_li_info->li_timer);
kfree(ext4_li_info);
ext4_li_in... | @@ -3391,6 +3391,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
get_random_bytes(&sbi->s_next_generation, sizeof(u32));
spin_lock_init(&sbi->s_next_gen_lock);
+ init_timer(&sbi->s_err_report);
+ sbi->s_err_report.function = print_daily_error_info;
+ sbi->s_err_report.data = (unsi... | null | null | null |
21,549 | static int ext4_run_li_request(struct ext4_li_request *elr)
{
struct ext4_group_desc *gdp = NULL;
ext4_group_t group, ngroups;
struct super_block *sb;
unsigned long timeout = 0;
int ret = 0;
sb = elr->lr_super;
ngroups = EXT4_SB(sb)->s_groups_count;
for (group = elr->lr_next_group; group < ngroups; group++) {... | DoS | 0 | static int ext4_run_li_request(struct ext4_li_request *elr)
{
struct ext4_group_desc *gdp = NULL;
ext4_group_t group, ngroups;
struct super_block *sb;
unsigned long timeout = 0;
int ret = 0;
sb = elr->lr_super;
ngroups = EXT4_SB(sb)->s_groups_count;
for (group = elr->lr_next_group; group < ngroups; group++) {... | @@ -3391,6 +3391,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
get_random_bytes(&sbi->s_next_generation, sizeof(u32));
spin_lock_init(&sbi->s_next_gen_lock);
+ init_timer(&sbi->s_err_report);
+ sbi->s_err_report.function = print_daily_error_info;
+ sbi->s_err_report.data = (unsi... | null | null | null |
21,550 | static int ext4_show_options(struct seq_file *seq, struct vfsmount *vfs)
{
int def_errors;
unsigned long def_mount_opts;
struct super_block *sb = vfs->mnt_sb;
struct ext4_sb_info *sbi = EXT4_SB(sb);
struct ext4_super_block *es = sbi->s_es;
def_mount_opts = le32_to_cpu(es->s_default_mount_opts);
def_errors =... | DoS | 0 | static int ext4_show_options(struct seq_file *seq, struct vfsmount *vfs)
{
int def_errors;
unsigned long def_mount_opts;
struct super_block *sb = vfs->mnt_sb;
struct ext4_sb_info *sbi = EXT4_SB(sb);
struct ext4_super_block *es = sbi->s_es;
def_mount_opts = le32_to_cpu(es->s_default_mount_opts);
def_errors =... | @@ -3391,6 +3391,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
get_random_bytes(&sbi->s_next_generation, sizeof(u32));
spin_lock_init(&sbi->s_next_gen_lock);
+ init_timer(&sbi->s_err_report);
+ sbi->s_err_report.function = print_daily_error_info;
+ sbi->s_err_report.data = (unsi... | null | null | null |
21,551 | static int ext4_statfs(struct dentry *dentry, struct kstatfs *buf)
{
struct super_block *sb = dentry->d_sb;
struct ext4_sb_info *sbi = EXT4_SB(sb);
struct ext4_super_block *es = sbi->s_es;
u64 fsid;
if (test_opt(sb, MINIX_DF)) {
sbi->s_overhead_last = 0;
} else if (sbi->s_blocks_last != ext4_blocks_count(es)) ... | DoS | 0 | static int ext4_statfs(struct dentry *dentry, struct kstatfs *buf)
{
struct super_block *sb = dentry->d_sb;
struct ext4_sb_info *sbi = EXT4_SB(sb);
struct ext4_super_block *es = sbi->s_es;
u64 fsid;
if (test_opt(sb, MINIX_DF)) {
sbi->s_overhead_last = 0;
} else if (sbi->s_blocks_last != ext4_blocks_count(es)) ... | @@ -3391,6 +3391,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
get_random_bytes(&sbi->s_next_generation, sizeof(u32));
spin_lock_init(&sbi->s_next_gen_lock);
+ init_timer(&sbi->s_err_report);
+ sbi->s_err_report.function = print_daily_error_info;
+ sbi->s_err_report.data = (unsi... | null | null | null |
21,552 | static int do_recv_NPByteRange(rpc_message_t *message, void *p_value)
{
NPByteRange **rangeListPtr = (NPByteRange **)p_value;
if (rangeListPtr == NULL)
return RPC_ERROR_MESSAGE_ARGUMENT_INVALID;
*rangeListPtr = NULL;
for (;;) {
int error;
uint32_t cont;
if ((error = rpc_message_recv_uint32(message, &cont)... | Bypass | 0 | static int do_recv_NPByteRange(rpc_message_t *message, void *p_value)
{
NPByteRange **rangeListPtr = (NPByteRange **)p_value;
if (rangeListPtr == NULL)
return RPC_ERROR_MESSAGE_ARGUMENT_INVALID;
*rangeListPtr = NULL;
for (;;) {
int error;
uint32_t cont;
if ((error = rpc_message_recv_uint32(message, &cont)... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,553 | static int do_recv_NPEvent(rpc_message_t *message, void *p_value)
{
NPEvent *event = (NPEvent *)p_value;
int32_t event_type;
int error;
if ((error = rpc_message_recv_int32(message, &event_type)) < 0)
return error;
memset(event, 0, sizeof(*event));
event->type = event_type;
switch (event->type) {
case... | Bypass | 0 | static int do_recv_NPEvent(rpc_message_t *message, void *p_value)
{
NPEvent *event = (NPEvent *)p_value;
int32_t event_type;
int error;
if ((error = rpc_message_recv_int32(message, &event_type)) < 0)
return error;
memset(event, 0, sizeof(*event));
event->type = event_type;
switch (event->type) {
case... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,554 | static int do_recv_NPIdentifier(rpc_message_t *message, void *p_value)
{
int error;
uint32_t id;
if ((error = rpc_message_recv_uint32(message, &id)) < 0)
return error;
NPIdentifier ident = NULL;
if (id) {
#ifdef BUILD_WRAPPER
ident = id_lookup(id);
#endif
#ifdef BUILD_VIEWER
ident = (void *)(uintptr_t)id... | Bypass | 0 | static int do_recv_NPIdentifier(rpc_message_t *message, void *p_value)
{
int error;
uint32_t id;
if ((error = rpc_message_recv_uint32(message, &id)) < 0)
return error;
NPIdentifier ident = NULL;
if (id) {
#ifdef BUILD_WRAPPER
ident = id_lookup(id);
#endif
#ifdef BUILD_VIEWER
ident = (void *)(uintptr_t)id... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,555 | static int do_recv_NPP(rpc_message_t *message, void *p_value)
{
int error;
NPW_PluginInstance *plugin;
if ((error = do_recv_NPW_PluginInstance(message, &plugin)) < 0)
return error;
*((NPP *)p_value) = plugin ? plugin->instance : NULL;
return RPC_ERROR_NO_ERROR;
}
| Bypass | 0 | static int do_recv_NPP(rpc_message_t *message, void *p_value)
{
int error;
NPW_PluginInstance *plugin;
if ((error = do_recv_NPW_PluginInstance(message, &plugin)) < 0)
return error;
*((NPP *)p_value) = plugin ? plugin->instance : NULL;
return RPC_ERROR_NO_ERROR;
}
| @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,556 | static int do_recv_NPPrint(rpc_message_t *message, void *p_value)
{
NPPrint *printInfo = (NPPrint *)p_value;
uint32_t print_mode;
int error;
if ((error = rpc_message_recv_uint32(message, &print_mode)) < 0)
return error;
switch (print_mode) {
case NP_FULL:
if ((error = do_recv_NPFullPrint(message, &printI... | Bypass | 0 | static int do_recv_NPPrint(rpc_message_t *message, void *p_value)
{
NPPrint *printInfo = (NPPrint *)p_value;
uint32_t print_mode;
int error;
if ((error = rpc_message_recv_uint32(message, &print_mode)) < 0)
return error;
switch (print_mode) {
case NP_FULL:
if ((error = do_recv_NPFullPrint(message, &printI... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,557 | static int do_recv_NPPrintData(rpc_message_t *message, void *p_value)
{
NPPrintData *printData = (NPPrintData *)p_value;
int error;
if ((error = rpc_message_recv_uint32(message, &printData->size)) < 0)
return error;
if ((error = rpc_message_recv_bytes(message, printData->data, printData->size)) < 0)
return e... | Bypass | 0 | static int do_recv_NPPrintData(rpc_message_t *message, void *p_value)
{
NPPrintData *printData = (NPPrintData *)p_value;
int error;
if ((error = rpc_message_recv_uint32(message, &printData->size)) < 0)
return error;
if ((error = rpc_message_recv_bytes(message, printData->data, printData->size)) < 0)
return e... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,558 | static int do_recv_NPRect(rpc_message_t *message, void *p_value)
{
NPRect *rect = (NPRect *)p_value;
uint32_t top, left, bottom, right;
int error;
if ((error = rpc_message_recv_uint32(message, &top)) < 0)
return error;
if ((error = rpc_message_recv_uint32(message, &left)) < 0)
return error;
if ((error = ... | Bypass | 0 | static int do_recv_NPRect(rpc_message_t *message, void *p_value)
{
NPRect *rect = (NPRect *)p_value;
uint32_t top, left, bottom, right;
int error;
if ((error = rpc_message_recv_uint32(message, &top)) < 0)
return error;
if ((error = rpc_message_recv_uint32(message, &left)) < 0)
return error;
if ((error = ... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,559 | static int do_recv_NPSetWindowCallbackStruct(rpc_message_t *message, void *p_value)
{
NPSetWindowCallbackStruct **ws_info_p = (NPSetWindowCallbackStruct **)p_value;
NPSetWindowCallbackStruct *ws_info;
int32_t type;
uint32_t has_ws_info, visual_id, colormap, depth;
int error;
if (ws_info_p)
*ws_info_p = NU... | Bypass | 0 | static int do_recv_NPSetWindowCallbackStruct(rpc_message_t *message, void *p_value)
{
NPSetWindowCallbackStruct **ws_info_p = (NPSetWindowCallbackStruct **)p_value;
NPSetWindowCallbackStruct *ws_info;
int32_t type;
uint32_t has_ws_info, visual_id, colormap, depth;
int error;
if (ws_info_p)
*ws_info_p = NU... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,560 | static int do_recv_NPStream(rpc_message_t *message, void *p_value)
{
int error;
uint32_t stream_id;
if ((error = rpc_message_recv_uint32(message, &stream_id)) < 0)
return error;
NPW_StreamInstance *stream = id_lookup(stream_id);
*((NPStream **)p_value) = stream ? stream->stream : NULL;
return RPC_ERROR_N... | Bypass | 0 | static int do_recv_NPStream(rpc_message_t *message, void *p_value)
{
int error;
uint32_t stream_id;
if ((error = rpc_message_recv_uint32(message, &stream_id)) < 0)
return error;
NPW_StreamInstance *stream = id_lookup(stream_id);
*((NPStream **)p_value) = stream ? stream->stream : NULL;
return RPC_ERROR_N... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,561 | static int do_recv_NPString(rpc_message_t *message, void *p_value)
{
NPString *string = (NPString *)p_value;
if (string == NULL)
return RPC_ERROR_MESSAGE_ARGUMENT_INVALID;
string->UTF8Length = 0;
string->UTF8Characters = NULL;
int error = rpc_message_recv_uint32(message, &string->UTF8Length);
if (error < ... | Bypass | 0 | static int do_recv_NPString(rpc_message_t *message, void *p_value)
{
NPString *string = (NPString *)p_value;
if (string == NULL)
return RPC_ERROR_MESSAGE_ARGUMENT_INVALID;
string->UTF8Length = 0;
string->UTF8Characters = NULL;
int error = rpc_message_recv_uint32(message, &string->UTF8Length);
if (error < ... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,562 | static int do_recv_NPUTF8(rpc_message_t *message, void *p_value)
{
NPUTF8 **string_p = (NPUTF8 **)p_value;
NPUTF8 *string = NULL;
uint32_t len;
int error = rpc_message_recv_uint32(message, &len);
if (error < 0)
return error;
if ((string = NPN_MemAlloc(len)) == NULL)
return RPC_ERROR_NO_MEMORY;
if (len ... | Bypass | 0 | static int do_recv_NPUTF8(rpc_message_t *message, void *p_value)
{
NPUTF8 **string_p = (NPUTF8 **)p_value;
NPUTF8 *string = NULL;
uint32_t len;
int error = rpc_message_recv_uint32(message, &len);
if (error < 0)
return error;
if ((string = NPN_MemAlloc(len)) == NULL)
return RPC_ERROR_NO_MEMORY;
if (len ... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,563 | static int do_recv_NPVariant(rpc_message_t *message, void *p_value)
{
NPVariant *variant = (NPVariant *)p_value;
if (variant)
VOID_TO_NPVARIANT(*variant);
uint32_t type;
int error = rpc_message_recv_uint32(message, &type);
if (error < 0)
return error;
NPVariant result;
VOID_TO_NPVARIANT(result);
swi... | Bypass | 0 | static int do_recv_NPVariant(rpc_message_t *message, void *p_value)
{
NPVariant *variant = (NPVariant *)p_value;
if (variant)
VOID_TO_NPVARIANT(*variant);
uint32_t type;
int error = rpc_message_recv_uint32(message, &type);
if (error < 0)
return error;
NPVariant result;
VOID_TO_NPVARIANT(result);
swi... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,564 | static int do_recv_NPW_PluginInstance(rpc_message_t *message, void *p_value)
{
int error;
uint32_t instance_id;
if ((error = rpc_message_recv_uint32(message, &instance_id)) < 0)
return error;
NPW_PluginInstance *plugin = id_lookup(instance_id);
if (instance_id && plugin == NULL)
npw_printf("ERROR: no vali... | Bypass | 0 | static int do_recv_NPW_PluginInstance(rpc_message_t *message, void *p_value)
{
int error;
uint32_t instance_id;
if ((error = rpc_message_recv_uint32(message, &instance_id)) < 0)
return error;
NPW_PluginInstance *plugin = id_lookup(instance_id);
if (instance_id && plugin == NULL)
npw_printf("ERROR: no vali... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,565 | static int do_recv_NPWindow(rpc_message_t *message, void *p_value)
{
NPWindow **window_p = (NPWindow **)p_value;
NPWindow *window;
uint32_t window_valid;
int error;
if (window_p)
*window_p = NULL;
if ((error = rpc_message_recv_uint32(message, &window_valid)) < 0)
return error;
if (window_valid) {
if (... | Bypass | 0 | static int do_recv_NPWindow(rpc_message_t *message, void *p_value)
{
NPWindow **window_p = (NPWindow **)p_value;
NPWindow *window;
uint32_t window_valid;
int error;
if (window_p)
*window_p = NULL;
if ((error = rpc_message_recv_uint32(message, &window_valid)) < 0)
return error;
if (window_valid) {
if (... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,566 | static int do_recv_NPWindowData(rpc_message_t *message, void *p_value)
{
NPWindow *window = (NPWindow *)p_value;
NPSetWindowCallbackStruct *ws_info;
uint32_t window_id;
int32_t window_type;
int error;
if (window == NULL)
return RPC_ERROR_MESSAGE_ARGUMENT_INVALID;
if ((error = rpc_message_recv_uint32(me... | Bypass | 0 | static int do_recv_NPWindowData(rpc_message_t *message, void *p_value)
{
NPWindow *window = (NPWindow *)p_value;
NPSetWindowCallbackStruct *ws_info;
uint32_t window_id;
int32_t window_type;
int error;
if (window == NULL)
return RPC_ERROR_MESSAGE_ARGUMENT_INVALID;
if ((error = rpc_message_recv_uint32(me... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,567 | static int do_recv_NotifyData(rpc_message_t *message, void *p_value)
{
int error;
uint64_t id;
if ((error = rpc_message_recv_uint64(message, &id)) < 0)
return error;
if (sizeof(void *) == 4 && ((uint32_t)(id >> 32)) != 0) {
npw_printf("ERROR: 64-bit viewers in 32-bit wrappers are not supported\n");
abort()... | Bypass | 0 | static int do_recv_NotifyData(rpc_message_t *message, void *p_value)
{
int error;
uint64_t id;
if ((error = rpc_message_recv_uint64(message, &id)) < 0)
return error;
if (sizeof(void *) == 4 && ((uint32_t)(id >> 32)) != 0) {
npw_printf("ERROR: 64-bit viewers in 32-bit wrappers are not supported\n");
abort()... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,568 | static int do_recv_XAnyEvent(rpc_message_t *message, XEvent *xevent)
{
uint32_t serial, send_event, window;
int error;
if ((error = rpc_message_recv_uint32(message, &serial)) < 0)
return error;
if ((error = rpc_message_recv_uint32(message, &send_event)) < 0)
return error;
if ((error = rpc_message_recv_uint3... | Bypass | 0 | static int do_recv_XAnyEvent(rpc_message_t *message, XEvent *xevent)
{
uint32_t serial, send_event, window;
int error;
if ((error = rpc_message_recv_uint32(message, &serial)) < 0)
return error;
if ((error = rpc_message_recv_uint32(message, &send_event)) < 0)
return error;
if ((error = rpc_message_recv_uint3... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,569 | static int do_recv_XButtonEvent(rpc_message_t *message, XEvent *xevent)
{
int32_t x, y, x_root, y_root, same_screen;
uint32_t root, subwindow, time, state, button;
int error;
if ((error = do_recv_XAnyEvent(message, xevent)) < 0)
return error;
if ((error = rpc_message_recv_uint32(message, &root)) < 0)
return... | Bypass | 0 | static int do_recv_XButtonEvent(rpc_message_t *message, XEvent *xevent)
{
int32_t x, y, x_root, y_root, same_screen;
uint32_t root, subwindow, time, state, button;
int error;
if ((error = do_recv_XAnyEvent(message, xevent)) < 0)
return error;
if ((error = rpc_message_recv_uint32(message, &root)) < 0)
return... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,570 | static int do_recv_XFocusChangeEvent(rpc_message_t *message, XEvent *xevent)
{
return RPC_ERROR_NO_ERROR;
}
| Bypass | 0 | static int do_recv_XFocusChangeEvent(rpc_message_t *message, XEvent *xevent)
{
return RPC_ERROR_NO_ERROR;
}
| @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,571 | static int do_recv_XGraphicsExposeEvent(rpc_message_t *message, XEvent *xevent)
{
int32_t x, y;
uint32_t width, height;
int error;
if ((error = do_recv_XAnyEvent(message, xevent)) < 0)
return error;
if ((error = rpc_message_recv_int32(message, &x)) < 0)
return error;
if ((error = rpc_message_recv_int32(me... | Bypass | 0 | static int do_recv_XGraphicsExposeEvent(rpc_message_t *message, XEvent *xevent)
{
int32_t x, y;
uint32_t width, height;
int error;
if ((error = do_recv_XAnyEvent(message, xevent)) < 0)
return error;
if ((error = rpc_message_recv_int32(message, &x)) < 0)
return error;
if ((error = rpc_message_recv_int32(me... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,572 | static int do_recv_XKeyEvent(rpc_message_t *message, XEvent *xevent)
{
int32_t x, y, x_root, y_root, same_screen;
uint32_t root, subwindow, time, state, keycode;
int error;
if ((error = do_recv_XAnyEvent(message, xevent)) < 0)
return error;
if ((error = rpc_message_recv_uint32(message, &root)) < 0)
return e... | Bypass | 0 | static int do_recv_XKeyEvent(rpc_message_t *message, XEvent *xevent)
{
int32_t x, y, x_root, y_root, same_screen;
uint32_t root, subwindow, time, state, keycode;
int error;
if ((error = do_recv_XAnyEvent(message, xevent)) < 0)
return error;
if ((error = rpc_message_recv_uint32(message, &root)) < 0)
return e... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,573 | static int do_recv_XMotionEvent(rpc_message_t *message, XEvent *xevent)
{
char is_hint;
int32_t x, y, x_root, y_root, same_screen;
uint32_t root, subwindow, time, state;
int error;
if ((error = do_recv_XAnyEvent(message, xevent)) < 0)
return error;
if ((error = rpc_message_recv_uint32(message, &root)) < 0)... | Bypass | 0 | static int do_recv_XMotionEvent(rpc_message_t *message, XEvent *xevent)
{
char is_hint;
int32_t x, y, x_root, y_root, same_screen;
uint32_t root, subwindow, time, state;
int error;
if ((error = do_recv_XAnyEvent(message, xevent)) < 0)
return error;
if ((error = rpc_message_recv_uint32(message, &root)) < 0)... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,574 | static int do_send_NPByteRange(rpc_message_t *message, void *p_value)
{
NPByteRange *range = (NPByteRange *)p_value;
while (range) {
int error;
if ((error = rpc_message_send_uint32(message, 1)) < 0)
return error;
if ((error = rpc_message_send_int32(message, range->offset)) < 0)
return error;
if ((error = ... | Bypass | 0 | static int do_send_NPByteRange(rpc_message_t *message, void *p_value)
{
NPByteRange *range = (NPByteRange *)p_value;
while (range) {
int error;
if ((error = rpc_message_send_uint32(message, 1)) < 0)
return error;
if ((error = rpc_message_send_int32(message, range->offset)) < 0)
return error;
if ((error = ... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,575 | static int do_send_NPEmbedPrint(rpc_message_t *message, void *p_value)
{
NPEmbedPrint *embedPrint = (NPEmbedPrint *)p_value;
int error;
if ((error = do_send_NPWindowData(message, &embedPrint->window)) < 0)
return error;
return RPC_ERROR_NO_ERROR;
}
| Bypass | 0 | static int do_send_NPEmbedPrint(rpc_message_t *message, void *p_value)
{
NPEmbedPrint *embedPrint = (NPEmbedPrint *)p_value;
int error;
if ((error = do_send_NPWindowData(message, &embedPrint->window)) < 0)
return error;
return RPC_ERROR_NO_ERROR;
}
| @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,576 | static int do_send_NPEvent(rpc_message_t *message, void *p_value)
{
NPEvent *event = (NPEvent *)p_value;
int error;
if (event == NULL || !is_valid_NPEvent_type(event))
return RPC_ERROR_MESSAGE_ARGUMENT_INVALID;
if ((error = rpc_message_send_int32(message, event->type)) < 0)
return error;
switch (event->t... | Bypass | 0 | static int do_send_NPEvent(rpc_message_t *message, void *p_value)
{
NPEvent *event = (NPEvent *)p_value;
int error;
if (event == NULL || !is_valid_NPEvent_type(event))
return RPC_ERROR_MESSAGE_ARGUMENT_INVALID;
if ((error = rpc_message_send_int32(message, event->type)) < 0)
return error;
switch (event->t... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,577 | static int do_send_NPObject(rpc_message_t *message, void *p_value)
{
uint32_t npobj_id = 0;
NPObject *npobj = (NPObject *)p_value;
if (npobj) {
NPObjectInfo *npobj_info = npobject_info_lookup(npobj);
if (npobj_info)
npobj_id = npobj_info->npobj_id;
#ifdef BUILD_WRAPPER
else {
if ((npobj_info = npobject_i... | Bypass | 0 | static int do_send_NPObject(rpc_message_t *message, void *p_value)
{
uint32_t npobj_id = 0;
NPObject *npobj = (NPObject *)p_value;
if (npobj) {
NPObjectInfo *npobj_info = npobject_info_lookup(npobj);
if (npobj_info)
npobj_id = npobj_info->npobj_id;
#ifdef BUILD_WRAPPER
else {
if ((npobj_info = npobject_i... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,578 | static int do_send_NPP(rpc_message_t *message, void *p_value)
{
NPP instance = (NPP)p_value;
NPW_PluginInstance *plugin = NULL;
if (instance)
plugin = NPW_PLUGIN_INSTANCE(instance);
return do_send_NPW_PluginInstance(message, plugin);
}
| Bypass | 0 | static int do_send_NPP(rpc_message_t *message, void *p_value)
{
NPP instance = (NPP)p_value;
NPW_PluginInstance *plugin = NULL;
if (instance)
plugin = NPW_PLUGIN_INSTANCE(instance);
return do_send_NPW_PluginInstance(message, plugin);
}
| @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,579 | static int do_send_NPPrint(rpc_message_t *message, void *p_value)
{
NPPrint *printInfo = (NPPrint *)p_value;
int error;
if ((error = rpc_message_send_uint32(message, printInfo->mode)) < 0)
return error;
switch (printInfo->mode) {
case NP_FULL:
if ((error = do_send_NPFullPrint(message, &printInfo->print.ful... | Bypass | 0 | static int do_send_NPPrint(rpc_message_t *message, void *p_value)
{
NPPrint *printInfo = (NPPrint *)p_value;
int error;
if ((error = rpc_message_send_uint32(message, printInfo->mode)) < 0)
return error;
switch (printInfo->mode) {
case NP_FULL:
if ((error = do_send_NPFullPrint(message, &printInfo->print.ful... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,580 | static int do_send_NPPrintData(rpc_message_t *message, void *p_value)
{
NPPrintData *printData = (NPPrintData *)p_value;
int error;
if ((error = rpc_message_send_uint32(message, printData->size)) < 0)
return error;
if ((error = rpc_message_send_bytes(message, printData->data, printData->size)) < 0)
return er... | Bypass | 0 | static int do_send_NPPrintData(rpc_message_t *message, void *p_value)
{
NPPrintData *printData = (NPPrintData *)p_value;
int error;
if ((error = rpc_message_send_uint32(message, printData->size)) < 0)
return error;
if ((error = rpc_message_send_bytes(message, printData->data, printData->size)) < 0)
return er... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,581 | static int do_send_NPSavedData(rpc_message_t *message, void *p_value)
{
NPSavedData *save_area = (NPSavedData *)p_value;
int error;
if (save_area == NULL) {
if ((error = rpc_message_send_int32(message, 0)) < 0)
return error;
}
else {
if ((error = rpc_message_send_int32(message, save_area->len)) < 0)
... | Bypass | 0 | static int do_send_NPSavedData(rpc_message_t *message, void *p_value)
{
NPSavedData *save_area = (NPSavedData *)p_value;
int error;
if (save_area == NULL) {
if ((error = rpc_message_send_int32(message, 0)) < 0)
return error;
}
else {
if ((error = rpc_message_send_int32(message, save_area->len)) < 0)
... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,582 | static int do_send_NPSetWindowCallbackStruct(rpc_message_t *message, void *p_value)
{
NPSetWindowCallbackStruct *ws_info = (NPSetWindowCallbackStruct *)p_value;
int error;
if (ws_info) {
if ((error = rpc_message_send_uint32(message, 1)) < 0)
return error;
if ((error = rpc_message_send_int32(message, ws_info... | Bypass | 0 | static int do_send_NPSetWindowCallbackStruct(rpc_message_t *message, void *p_value)
{
NPSetWindowCallbackStruct *ws_info = (NPSetWindowCallbackStruct *)p_value;
int error;
if (ws_info) {
if ((error = rpc_message_send_uint32(message, 1)) < 0)
return error;
if ((error = rpc_message_send_int32(message, ws_info... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,583 | static int do_send_NPStream(rpc_message_t *message, void *p_value)
{
uint32_t stream_id = 0;
NPStream *stream = (NPStream *)p_value;
if (stream) {
NPW_StreamInstance *sip = NPW_STREAM_INSTANCE(stream);
if (sip)
stream_id = sip->stream_id;
}
return rpc_message_send_uint32(message, stream_id);
}
| Bypass | 0 | static int do_send_NPStream(rpc_message_t *message, void *p_value)
{
uint32_t stream_id = 0;
NPStream *stream = (NPStream *)p_value;
if (stream) {
NPW_StreamInstance *sip = NPW_STREAM_INSTANCE(stream);
if (sip)
stream_id = sip->stream_id;
}
return rpc_message_send_uint32(message, stream_id);
}
| @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,584 | static int do_send_NPVariant(rpc_message_t *message, void *p_value)
{
NPVariant *variant = (NPVariant *)p_value;
if (variant == NULL)
return RPC_ERROR_MESSAGE_ARGUMENT_INVALID;
int error = rpc_message_send_uint32(message, variant->type);
if (error < 0)
return error;
switch (variant->type) {
case NPVaria... | Bypass | 0 | static int do_send_NPVariant(rpc_message_t *message, void *p_value)
{
NPVariant *variant = (NPVariant *)p_value;
if (variant == NULL)
return RPC_ERROR_MESSAGE_ARGUMENT_INVALID;
int error = rpc_message_send_uint32(message, variant->type);
if (error < 0)
return error;
switch (variant->type) {
case NPVaria... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,585 | static int do_send_NPW_PluginInstance(rpc_message_t *message, void *p_value)
{
NPW_PluginInstance *plugin = (NPW_PluginInstance *)p_value;
uint32_t instance_id = 0;
if (plugin)
instance_id = plugin->instance_id;
return rpc_message_send_uint32(message, instance_id);
}
| Bypass | 0 | static int do_send_NPW_PluginInstance(rpc_message_t *message, void *p_value)
{
NPW_PluginInstance *plugin = (NPW_PluginInstance *)p_value;
uint32_t instance_id = 0;
if (plugin)
instance_id = plugin->instance_id;
return rpc_message_send_uint32(message, instance_id);
}
| @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,586 | static int do_send_NPWindow(rpc_message_t *message, void *p_value)
{
NPWindow *window = (NPWindow *)p_value;
int error;
if (window == NULL) {
if ((error = rpc_message_send_uint32(message, 0)) < 0)
return error;
}
else {
if ((error = rpc_message_send_uint32(message, 1)) < 0)
return error;
if ((error ... | Bypass | 0 | static int do_send_NPWindow(rpc_message_t *message, void *p_value)
{
NPWindow *window = (NPWindow *)p_value;
int error;
if (window == NULL) {
if ((error = rpc_message_send_uint32(message, 0)) < 0)
return error;
}
else {
if ((error = rpc_message_send_uint32(message, 1)) < 0)
return error;
if ((error ... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,587 | static int do_send_NotifyData(rpc_message_t *message, void *p_value)
{
void *notifyData = (void *)p_value;
return rpc_message_send_uint64(message, (uintptr_t)notifyData);
}
| Bypass | 0 | static int do_send_NotifyData(rpc_message_t *message, void *p_value)
{
void *notifyData = (void *)p_value;
return rpc_message_send_uint64(message, (uintptr_t)notifyData);
}
| @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,588 | static int do_send_XAnyEvent(rpc_message_t *message, XEvent *xevent)
{
int error;
if ((error = rpc_message_send_uint32(message, xevent->xany.serial)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, xevent->xany.send_event)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, xeve... | Bypass | 0 | static int do_send_XAnyEvent(rpc_message_t *message, XEvent *xevent)
{
int error;
if ((error = rpc_message_send_uint32(message, xevent->xany.serial)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, xevent->xany.send_event)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, xeve... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,589 | static int do_send_XCrossingEvent(rpc_message_t *message, XEvent *xevent)
{
int error;
if ((error = do_send_XAnyEvent(message, xevent)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, xevent->xcrossing.root)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, xevent->xcrossing.s... | Bypass | 0 | static int do_send_XCrossingEvent(rpc_message_t *message, XEvent *xevent)
{
int error;
if ((error = do_send_XAnyEvent(message, xevent)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, xevent->xcrossing.root)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, xevent->xcrossing.s... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,590 | static int do_send_XFocusChangeEvent(rpc_message_t *message, XEvent *xevent)
{
return RPC_ERROR_NO_ERROR;
}
| Bypass | 0 | static int do_send_XFocusChangeEvent(rpc_message_t *message, XEvent *xevent)
{
return RPC_ERROR_NO_ERROR;
}
| @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,591 | static int do_send_XGraphicsExposeEvent(rpc_message_t *message, XEvent *xevent)
{
int error;
if ((error = do_send_XAnyEvent(message, xevent)) < 0)
return error;
if ((error = rpc_message_send_int32(message, xevent->xgraphicsexpose.x)) < 0)
return error;
if ((error = rpc_message_send_int32(message, xevent->xgra... | Bypass | 0 | static int do_send_XGraphicsExposeEvent(rpc_message_t *message, XEvent *xevent)
{
int error;
if ((error = do_send_XAnyEvent(message, xevent)) < 0)
return error;
if ((error = rpc_message_send_int32(message, xevent->xgraphicsexpose.x)) < 0)
return error;
if ((error = rpc_message_send_int32(message, xevent->xgra... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,592 | static int do_send_XKeyEvent(rpc_message_t *message, XEvent *xevent)
{
int error;
if ((error = do_send_XAnyEvent(message, xevent)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, xevent->xkey.root)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, xevent->xkey.subwindow)) < 0)... | Bypass | 0 | static int do_send_XKeyEvent(rpc_message_t *message, XEvent *xevent)
{
int error;
if ((error = do_send_XAnyEvent(message, xevent)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, xevent->xkey.root)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, xevent->xkey.subwindow)) < 0)... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,593 | static int do_send_XMotionEvent(rpc_message_t *message, XEvent *xevent)
{
int error;
if ((error = do_send_XAnyEvent(message, xevent)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, xevent->xmotion.root)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, xevent->xmotion.subwind... | Bypass | 0 | static int do_send_XMotionEvent(rpc_message_t *message, XEvent *xevent)
{
int error;
if ((error = do_send_XAnyEvent(message, xevent)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, xevent->xmotion.root)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, xevent->xmotion.subwind... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,594 | static bool is_valid_NPEvent_type(NPEvent *event)
{
switch (event->type) {
case GraphicsExpose:
case FocusIn:
case FocusOut:
case EnterNotify:
case LeaveNotify:
case MotionNotify:
case ButtonPress:
case ButtonRelease:
case KeyPress:
case KeyRelease:
return true;
default:
break;
}
return fa... | Bypass | 0 | static bool is_valid_NPEvent_type(NPEvent *event)
{
switch (event->type) {
case GraphicsExpose:
case FocusIn:
case FocusOut:
case EnterNotify:
case LeaveNotify:
case MotionNotify:
case ButtonPress:
case ButtonRelease:
case KeyPress:
case KeyRelease:
return true;
default:
break;
}
return fa... | @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,595 | int rpc_add_np_marshalers(rpc_connection_t *connection)
{
return rpc_connection_add_message_descriptors(connection, message_descs, sizeof(message_descs) / sizeof(message_descs[0]));
}
| Bypass | 0 | int rpc_add_np_marshalers(rpc_connection_t *connection)
{
return rpc_connection_add_message_descriptors(connection, message_descs, sizeof(message_descs) / sizeof(message_descs[0]));
}
| @@ -41,6 +41,8 @@ int rpc_type_of_NPNVariable(int variable)
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
+ case NPNVprivateModeBool:
+ case NPNVsupportsAdvancedKeyHandling:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVToolkit:
@@ -65,6 +67,7 @@ int rpc_type_of_NPPVaria... | CWE-264 | null | null |
21,596 | static inline int add_appcontext_input(int fd, int n)
{
return XtAppAddInput(x_app_context,
fd,
GUINT_TO_POINTER(XtInputWriteMask),
xt_dummy_input_cb,
GUINT_TO_POINTER(0xdead0000));
}
| Bypass | 0 | static inline int add_appcontext_input(int fd, int n)
{
return XtAppAddInput(x_app_context,
fd,
GUINT_TO_POINTER(XtInputWriteMask),
xt_dummy_input_cb,
GUINT_TO_POINTER(0xdead0000));
}
| @@ -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,597 | cached_NPN_GetIntIdentifier(int32_t intid)
{
NPIdentifier ident;
if (!use_npidentifier_cache())
ident = invoke_NPN_GetIntIdentifier(intid);
#if USE_NPIDENTIFIER_CACHE
else if (!npidentifier_cache_has_int(intid, &ident)) {
ident = invoke_NPN_GetIntIdentifier(intid);
npidentifier_cache_reserve(1);
npidentifier_... | Bypass | 0 | cached_NPN_GetIntIdentifier(int32_t intid)
{
NPIdentifier ident;
if (!use_npidentifier_cache())
ident = invoke_NPN_GetIntIdentifier(intid);
#if USE_NPIDENTIFIER_CACHE
else if (!npidentifier_cache_has_int(intid, &ident)) {
ident = invoke_NPN_GetIntIdentifier(intid);
npidentifier_cache_reserve(1);
npidentifier_... | @@ -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,598 | cached_NPN_GetStringIdentifier(const NPUTF8 *name)
{
NPIdentifier ident;
if (!use_npidentifier_cache())
ident = invoke_NPN_GetStringIdentifier(name);
#if USE_NPIDENTIFIER_CACHE
else if (!npidentifier_cache_has_string(name, &ident)) {
ident = invoke_NPN_GetStringIdentifier(name);
npidentifier_cache_reserve(1);
... | Bypass | 0 | cached_NPN_GetStringIdentifier(const NPUTF8 *name)
{
NPIdentifier ident;
if (!use_npidentifier_cache())
ident = invoke_NPN_GetStringIdentifier(name);
#if USE_NPIDENTIFIER_CACHE
else if (!npidentifier_cache_has_string(name, &ident)) {
ident = invoke_NPN_GetStringIdentifier(name);
npidentifier_cache_reserve(1);
... | @@ -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,599 | cached_NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, NPIdentifier *identifiers)
{
/* XXX: could be optimized further */
invoke_NPN_GetStringIdentifiers(names, nameCount, identifiers);
#if USE_NPIDENTIFIER_CACHE
if (use_npidentifier_cache()) {
for (int i = 0; i < nameCount; i++) {
NPIdenti... | Bypass | 0 | cached_NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, NPIdentifier *identifiers)
{
/* XXX: could be optimized further */
invoke_NPN_GetStringIdentifiers(names, nameCount, identifiers);
#if USE_NPIDENTIFIER_CACHE
if (use_npidentifier_cache()) {
for (int i = 0; i < nameCount; i++) {
NPIdenti... | @@ -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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.