idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
46,800
void __readwrite_bug(const char *fn) { printk("%s called, but not implemented\n", fn); BUG(); }
+Priv
0
void __readwrite_bug(const char *fn) { printk("%s called, but not implemented\n", fn); BUG(); }
@@ -581,7 +581,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) return regs->ARM_r0; case NR(set_tls): - thread->tp_value = regs->ARM_r0; + thread->tp_value[0] = regs->ARM_r0; if (tls_emu) return 0; if (has_tls_reg) { @@ -699,7 +699,7 @@ static int get_tp_trap(struct pt_regs *regs, unsig...
CWE-264
null
null
46,801
void abort(void) { BUG(); /* if that doesn't kill us, halt */ panic("Oops failed to kill thread"); }
+Priv
0
void abort(void) { BUG(); /* if that doesn't kill us, halt */ panic("Oops failed to kill thread"); }
@@ -581,7 +581,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) return regs->ARM_r0; case NR(set_tls): - thread->tp_value = regs->ARM_r0; + thread->tp_value[0] = regs->ARM_r0; if (tls_emu) return 0; if (has_tls_reg) { @@ -699,7 +699,7 @@ static int get_tp_trap(struct pt_regs *regs, unsig...
CWE-264
null
null
46,802
static int __init arm_mrc_hook_init(void) { register_undef_hook(&arm_mrc_hook); return 0; }
+Priv
0
static int __init arm_mrc_hook_init(void) { register_undef_hook(&arm_mrc_hook); return 0; }
@@ -581,7 +581,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) return regs->ARM_r0; case NR(set_tls): - thread->tp_value = regs->ARM_r0; + thread->tp_value[0] = regs->ARM_r0; if (tls_emu) return 0; if (has_tls_reg) { @@ -699,7 +699,7 @@ static int get_tp_trap(struct pt_regs *regs, unsig...
CWE-264
null
null
46,803
void arm_notify_die(const char *str, struct pt_regs *regs, struct siginfo *info, unsigned long err, unsigned long trap) { if (user_mode(regs)) { current->thread.error_code = err; current->thread.trap_no = trap; force_sig_info(info->si_signo, info, current); } else { die(str, regs, err); } }
+Priv
0
void arm_notify_die(const char *str, struct pt_regs *regs, struct siginfo *info, unsigned long err, unsigned long trap) { if (user_mode(regs)) { current->thread.error_code = err; current->thread.trap_no = trap; force_sig_info(info->si_signo, info, current); } else { die(str, regs, err); } }
@@ -581,7 +581,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) return regs->ARM_r0; case NR(set_tls): - thread->tp_value = regs->ARM_r0; + thread->tp_value[0] = regs->ARM_r0; if (tls_emu) return 0; if (has_tls_reg) { @@ -699,7 +699,7 @@ static int get_tp_trap(struct pt_regs *regs, unsig...
CWE-264
null
null
46,804
asmlinkage void bad_mode(struct pt_regs *regs, int reason) { console_verbose(); printk(KERN_CRIT "Bad mode in %s handler detected\n", handler[reason]); die("Oops - bad mode", regs, 0); local_irq_disable(); panic("bad mode"); }
+Priv
0
asmlinkage void bad_mode(struct pt_regs *regs, int reason) { console_verbose(); printk(KERN_CRIT "Bad mode in %s handler detected\n", handler[reason]); die("Oops - bad mode", regs, 0); local_irq_disable(); panic("bad mode"); }
@@ -581,7 +581,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) return regs->ARM_r0; case NR(set_tls): - thread->tp_value = regs->ARM_r0; + thread->tp_value[0] = regs->ARM_r0; if (tls_emu) return 0; if (has_tls_reg) { @@ -699,7 +699,7 @@ static int get_tp_trap(struct pt_regs *regs, unsig...
CWE-264
null
null
46,805
static int bad_syscall(int n, struct pt_regs *regs) { struct thread_info *thread = current_thread_info(); siginfo_t info; if ((current->personality & PER_MASK) != PER_LINUX && thread->exec_domain->handler) { thread->exec_domain->handler(n, regs); return regs->ARM_r0; } #ifdef CONFIG_DEBUG_USER if (user_...
+Priv
0
static int bad_syscall(int n, struct pt_regs *regs) { struct thread_info *thread = current_thread_info(); siginfo_t info; if ((current->personality & PER_MASK) != PER_LINUX && thread->exec_domain->handler) { thread->exec_domain->handler(n, regs); return regs->ARM_r0; } #ifdef CONFIG_DEBUG_USER if (user_...
@@ -581,7 +581,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) return regs->ARM_r0; case NR(set_tls): - thread->tp_value = regs->ARM_r0; + thread->tp_value[0] = regs->ARM_r0; if (tls_emu) return 0; if (has_tls_reg) { @@ -699,7 +699,7 @@ static int get_tp_trap(struct pt_regs *regs, unsig...
CWE-264
null
null
46,806
static int call_undef_hook(struct pt_regs *regs, unsigned int instr) { struct undef_hook *hook; unsigned long flags; int (*fn)(struct pt_regs *regs, unsigned int instr) = NULL; raw_spin_lock_irqsave(&undef_lock, flags); list_for_each_entry(hook, &undef_hook, node) if ((instr & hook->instr_mask) == hook->instr_v...
+Priv
0
static int call_undef_hook(struct pt_regs *regs, unsigned int instr) { struct undef_hook *hook; unsigned long flags; int (*fn)(struct pt_regs *regs, unsigned int instr) = NULL; raw_spin_lock_irqsave(&undef_lock, flags); list_for_each_entry(hook, &undef_hook, node) if ((instr & hook->instr_mask) == hook->instr_v...
@@ -581,7 +581,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) return regs->ARM_r0; case NR(set_tls): - thread->tp_value = regs->ARM_r0; + thread->tp_value[0] = regs->ARM_r0; if (tls_emu) return 0; if (has_tls_reg) { @@ -699,7 +699,7 @@ static int get_tp_trap(struct pt_regs *regs, unsig...
CWE-264
null
null
46,807
void die(const char *str, struct pt_regs *regs, int err) { enum bug_trap_type bug_type = BUG_TRAP_TYPE_NONE; unsigned long flags = oops_begin(); int sig = SIGSEGV; if (!user_mode(regs)) bug_type = report_bug(regs->ARM_pc, regs); if (bug_type != BUG_TRAP_TYPE_NONE) str = "Oops - BUG"; if (__die(str, err, reg...
+Priv
0
void die(const char *str, struct pt_regs *regs, int err) { enum bug_trap_type bug_type = BUG_TRAP_TYPE_NONE; unsigned long flags = oops_begin(); int sig = SIGSEGV; if (!user_mode(regs)) bug_type = report_bug(regs->ARM_pc, regs); if (bug_type != BUG_TRAP_TYPE_NONE) str = "Oops - BUG"; if (__die(str, err, reg...
@@ -581,7 +581,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) return regs->ARM_r0; case NR(set_tls): - thread->tp_value = regs->ARM_r0; + thread->tp_value[0] = regs->ARM_r0; if (tls_emu) return 0; if (has_tls_reg) { @@ -699,7 +699,7 @@ static int get_tp_trap(struct pt_regs *regs, unsig...
CWE-264
null
null
46,808
asmlinkage void __exception do_undefinstr(struct pt_regs *regs) { unsigned int instr; siginfo_t info; void __user *pc; pc = (void __user *)instruction_pointer(regs); if (processor_mode(regs) == SVC_MODE) { #ifdef CONFIG_THUMB2_KERNEL if (thumb_mode(regs)) { instr = ((u16 *)pc)[0]; if (is_wide_instruction...
+Priv
0
asmlinkage void __exception do_undefinstr(struct pt_regs *regs) { unsigned int instr; siginfo_t info; void __user *pc; pc = (void __user *)instruction_pointer(regs); if (processor_mode(regs) == SVC_MODE) { #ifdef CONFIG_THUMB2_KERNEL if (thumb_mode(regs)) { instr = ((u16 *)pc)[0]; if (is_wide_instruction...
@@ -581,7 +581,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) return regs->ARM_r0; case NR(set_tls): - thread->tp_value = regs->ARM_r0; + thread->tp_value[0] = regs->ARM_r0; if (tls_emu) return 0; if (has_tls_reg) { @@ -699,7 +699,7 @@ static int get_tp_trap(struct pt_regs *regs, unsig...
CWE-264
null
null
46,809
asmlinkage void do_unexp_fiq (struct pt_regs *regs) { printk("Hmm. Unexpected FIQ received, but trying to continue\n"); printk("You may have a hardware problem...\n"); }
+Priv
0
asmlinkage void do_unexp_fiq (struct pt_regs *regs) { printk("Hmm. Unexpected FIQ received, but trying to continue\n"); printk("You may have a hardware problem...\n"); }
@@ -581,7 +581,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) return regs->ARM_r0; case NR(set_tls): - thread->tp_value = regs->ARM_r0; + thread->tp_value[0] = regs->ARM_r0; if (tls_emu) return 0; if (has_tls_reg) { @@ -699,7 +699,7 @@ static int get_tp_trap(struct pt_regs *regs, unsig...
CWE-264
null
null
46,810
static inline void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk) { unwind_backtrace(regs, tsk); }
+Priv
0
static inline void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk) { unwind_backtrace(regs, tsk); }
@@ -581,7 +581,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) return regs->ARM_r0; case NR(set_tls): - thread->tp_value = regs->ARM_r0; + thread->tp_value[0] = regs->ARM_r0; if (tls_emu) return 0; if (has_tls_reg) { @@ -699,7 +699,7 @@ static int get_tp_trap(struct pt_regs *regs, unsig...
CWE-264
null
null
46,811
void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long frame) { #ifdef CONFIG_KALLSYMS printk("[<%08lx>] (%pS) from [<%08lx>] (%pS)\n", where, (void *)where, from, (void *)from); #else printk("Function entered at [<%08lx>] from [<%08lx>]\n", where, from); #endif if (in_exception_text(where...
+Priv
0
void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long frame) { #ifdef CONFIG_KALLSYMS printk("[<%08lx>] (%pS) from [<%08lx>] (%pS)\n", where, (void *)where, from, (void *)from); #else printk("Function entered at [<%08lx>] from [<%08lx>]\n", where, from); #endif if (in_exception_text(where...
@@ -581,7 +581,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) return regs->ARM_r0; case NR(set_tls): - thread->tp_value = regs->ARM_r0; + thread->tp_value[0] = regs->ARM_r0; if (tls_emu) return 0; if (has_tls_reg) { @@ -699,7 +699,7 @@ static int get_tp_trap(struct pt_regs *regs, unsig...
CWE-264
null
null
46,812
static void dump_instr(const char *lvl, struct pt_regs *regs) { unsigned long addr = instruction_pointer(regs); const int thumb = thumb_mode(regs); const int width = thumb ? 4 : 8; mm_segment_t fs; char str[sizeof("00000000 ") * 5 + 2 + 1], *p = str; int i; /* * We need to switch to kernel mode so that we can...
+Priv
0
static void dump_instr(const char *lvl, struct pt_regs *regs) { unsigned long addr = instruction_pointer(regs); const int thumb = thumb_mode(regs); const int width = thumb ? 4 : 8; mm_segment_t fs; char str[sizeof("00000000 ") * 5 + 2 + 1], *p = str; int i; /* * We need to switch to kernel mode so that we can...
@@ -581,7 +581,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) return regs->ARM_r0; case NR(set_tls): - thread->tp_value = regs->ARM_r0; + thread->tp_value[0] = regs->ARM_r0; if (tls_emu) return 0; if (has_tls_reg) { @@ -699,7 +699,7 @@ static int get_tp_trap(struct pt_regs *regs, unsig...
CWE-264
null
null
46,813
static void dump_mem(const char *lvl, const char *str, unsigned long bottom, unsigned long top) { unsigned long first; mm_segment_t fs; int i; /* * We need to switch to kernel mode so that we can use __get_user * to safely read from kernel space. Note that we now dump the * code first, just in case t...
+Priv
0
static void dump_mem(const char *lvl, const char *str, unsigned long bottom, unsigned long top) { unsigned long first; mm_segment_t fs; int i; /* * We need to switch to kernel mode so that we can use __get_user * to safely read from kernel space. Note that we now dump the * code first, just in case t...
@@ -581,7 +581,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) return regs->ARM_r0; case NR(set_tls): - thread->tp_value = regs->ARM_r0; + thread->tp_value[0] = regs->ARM_r0; if (tls_emu) return 0; if (has_tls_reg) { @@ -699,7 +699,7 @@ static int get_tp_trap(struct pt_regs *regs, unsig...
CWE-264
null
null
46,814
void __init early_trap_init(void *vectors_base) { unsigned long vectors = (unsigned long)vectors_base; extern char __stubs_start[], __stubs_end[]; extern char __vectors_start[], __vectors_end[]; extern char __kuser_helper_start[], __kuser_helper_end[]; int kuser_sz = __kuser_helper_end - __kuser_helper_start; ve...
+Priv
0
void __init early_trap_init(void *vectors_base) { unsigned long vectors = (unsigned long)vectors_base; extern char __stubs_start[], __stubs_end[]; extern char __vectors_start[], __vectors_end[]; extern char __kuser_helper_start[], __kuser_helper_end[]; int kuser_sz = __kuser_helper_end - __kuser_helper_start; ve...
@@ -581,7 +581,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) return regs->ARM_r0; case NR(set_tls): - thread->tp_value = regs->ARM_r0; + thread->tp_value[0] = regs->ARM_r0; if (tls_emu) return 0; if (has_tls_reg) { @@ -699,7 +699,7 @@ static int get_tp_trap(struct pt_regs *regs, unsig...
CWE-264
null
null
46,815
static void __init kuser_get_tls_init(unsigned long vectors) { /* * vectors + 0xfe0 = __kuser_get_tls * vectors + 0xfe8 = hardware TLS instruction at 0xffff0fe8 */ if (tls_emu || has_tls_reg) memcpy((void *)vectors + 0xfe0, (void *)vectors + 0xfe8, 4); }
+Priv
0
static void __init kuser_get_tls_init(unsigned long vectors) { /* * vectors + 0xfe0 = __kuser_get_tls * vectors + 0xfe8 = hardware TLS instruction at 0xffff0fe8 */ if (tls_emu || has_tls_reg) memcpy((void *)vectors + 0xfe0, (void *)vectors + 0xfe8, 4); }
@@ -581,7 +581,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) return regs->ARM_r0; case NR(set_tls): - thread->tp_value = regs->ARM_r0; + thread->tp_value[0] = regs->ARM_r0; if (tls_emu) return 0; if (has_tls_reg) { @@ -699,7 +699,7 @@ static int get_tp_trap(struct pt_regs *regs, unsig...
CWE-264
null
null
46,816
static void oops_end(unsigned long flags, struct pt_regs *regs, int signr) { if (regs && kexec_should_crash(current)) crash_kexec(regs); bust_spinlocks(0); die_owner = -1; add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE); die_nest_count--; if (!die_nest_count) /* Nest count reaches zero, release the lock. */ a...
+Priv
0
static void oops_end(unsigned long flags, struct pt_regs *regs, int signr) { if (regs && kexec_should_crash(current)) crash_kexec(regs); bust_spinlocks(0); die_owner = -1; add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE); die_nest_count--; if (!die_nest_count) /* Nest count reaches zero, release the lock. */ a...
@@ -581,7 +581,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) return regs->ARM_r0; case NR(set_tls): - thread->tp_value = regs->ARM_r0; + thread->tp_value[0] = regs->ARM_r0; if (tls_emu) return 0; if (has_tls_reg) { @@ -699,7 +699,7 @@ static int get_tp_trap(struct pt_regs *regs, unsig...
CWE-264
null
null
46,817
void register_undef_hook(struct undef_hook *hook) { unsigned long flags; raw_spin_lock_irqsave(&undef_lock, flags); list_add(&hook->node, &undef_hook); raw_spin_unlock_irqrestore(&undef_lock, flags); }
+Priv
0
void register_undef_hook(struct undef_hook *hook) { unsigned long flags; raw_spin_lock_irqsave(&undef_lock, flags); list_add(&hook->node, &undef_hook); raw_spin_unlock_irqrestore(&undef_lock, flags); }
@@ -581,7 +581,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) return regs->ARM_r0; case NR(set_tls): - thread->tp_value = regs->ARM_r0; + thread->tp_value[0] = regs->ARM_r0; if (tls_emu) return 0; if (has_tls_reg) { @@ -699,7 +699,7 @@ static int get_tp_trap(struct pt_regs *regs, unsig...
CWE-264
null
null
46,818
void unregister_undef_hook(struct undef_hook *hook) { unsigned long flags; raw_spin_lock_irqsave(&undef_lock, flags); list_del(&hook->node); raw_spin_unlock_irqrestore(&undef_lock, flags); }
+Priv
0
void unregister_undef_hook(struct undef_hook *hook) { unsigned long flags; raw_spin_lock_irqsave(&undef_lock, flags); list_del(&hook->node); raw_spin_unlock_irqrestore(&undef_lock, flags); }
@@ -581,7 +581,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) return regs->ARM_r0; case NR(set_tls): - thread->tp_value = regs->ARM_r0; + thread->tp_value[0] = regs->ARM_r0; if (tls_emu) return 0; if (has_tls_reg) { @@ -699,7 +699,7 @@ static int get_tp_trap(struct pt_regs *regs, unsig...
CWE-264
null
null
46,819
static void __do_kernel_fault(struct mm_struct *mm, unsigned long addr, unsigned int esr, struct pt_regs *regs) { /* * Are we prepared to handle this kernel fault? */ if (fixup_exception(regs)) return; /* * No handler, we'll have to terminate things with extreme prejudice. */ bust_spinlocks(1); ...
+Priv
0
static void __do_kernel_fault(struct mm_struct *mm, unsigned long addr, unsigned int esr, struct pt_regs *regs) { /* * Are we prepared to handle this kernel fault? */ if (fixup_exception(regs)) return; /* * No handler, we'll have to terminate things with extreme prejudice. */ bust_spinlocks(1); ...
@@ -173,7 +173,8 @@ static int __do_page_fault(struct mm_struct *mm, unsigned long addr, good_area: /* * Check that the permissions on the VMA allow for the fault which - * occurred. + * occurred. If we encountered a write or exec fault, we must have + * appropriate permissions, otherwise we allow any permissi...
CWE-19
null
null
46,820
static void __do_user_fault(struct task_struct *tsk, unsigned long addr, unsigned int esr, unsigned int sig, int code, struct pt_regs *regs) { struct siginfo si; if (show_unhandled_signals && unhandled_signal(tsk, sig) && printk_ratelimit()) { pr_info("%s[%d]: unhandled %s (%d) at 0x%08lx, esr 0...
+Priv
0
static void __do_user_fault(struct task_struct *tsk, unsigned long addr, unsigned int esr, unsigned int sig, int code, struct pt_regs *regs) { struct siginfo si; if (show_unhandled_signals && unhandled_signal(tsk, sig) && printk_ratelimit()) { pr_info("%s[%d]: unhandled %s (%d) at 0x%08lx, esr 0...
@@ -173,7 +173,8 @@ static int __do_page_fault(struct mm_struct *mm, unsigned long addr, good_area: /* * Check that the permissions on the VMA allow for the fault which - * occurred. + * occurred. If we encountered a write or exec fault, we must have + * appropriate permissions, otherwise we allow any permissi...
CWE-19
null
null
46,821
static void do_bad_area(unsigned long addr, unsigned int esr, struct pt_regs *regs) { struct task_struct *tsk = current; struct mm_struct *mm = tsk->active_mm; /* * If we are in kernel mode at this point, we have no context to * handle this fault with. */ if (user_mode(regs)) __do_user_fault(tsk, addr, esr...
+Priv
0
static void do_bad_area(unsigned long addr, unsigned int esr, struct pt_regs *regs) { struct task_struct *tsk = current; struct mm_struct *mm = tsk->active_mm; /* * If we are in kernel mode at this point, we have no context to * handle this fault with. */ if (user_mode(regs)) __do_user_fault(tsk, addr, esr...
@@ -173,7 +173,8 @@ static int __do_page_fault(struct mm_struct *mm, unsigned long addr, good_area: /* * Check that the permissions on the VMA allow for the fault which - * occurred. + * occurred. If we encountered a write or exec fault, we must have + * appropriate permissions, otherwise we allow any permissi...
CWE-19
null
null
46,822
asmlinkage int __exception do_debug_exception(unsigned long addr, unsigned int esr, struct pt_regs *regs) { const struct fault_info *inf = debug_fault_info + DBG_ESR_EVT(esr); struct siginfo info; if (!inf->fn(addr, esr, regs)) return 1; pr_alert("Unhandled debug exception: %s (0x%08x) at ...
+Priv
0
asmlinkage int __exception do_debug_exception(unsigned long addr, unsigned int esr, struct pt_regs *regs) { const struct fault_info *inf = debug_fault_info + DBG_ESR_EVT(esr); struct siginfo info; if (!inf->fn(addr, esr, regs)) return 1; pr_alert("Unhandled debug exception: %s (0x%08x) at ...
@@ -173,7 +173,8 @@ static int __do_page_fault(struct mm_struct *mm, unsigned long addr, good_area: /* * Check that the permissions on the VMA allow for the fault which - * occurred. + * occurred. If we encountered a write or exec fault, we must have + * appropriate permissions, otherwise we allow any permissi...
CWE-19
null
null
46,823
asmlinkage void __exception do_mem_abort(unsigned long addr, unsigned int esr, struct pt_regs *regs) { const struct fault_info *inf = fault_info + (esr & 63); struct siginfo info; if (!inf->fn(addr, esr, regs)) return; pr_alert("Unhandled fault: %s (0x%08x) at 0x%016lx\n", inf->name, esr, addr); info...
+Priv
0
asmlinkage void __exception do_mem_abort(unsigned long addr, unsigned int esr, struct pt_regs *regs) { const struct fault_info *inf = fault_info + (esr & 63); struct siginfo info; if (!inf->fn(addr, esr, regs)) return; pr_alert("Unhandled fault: %s (0x%08x) at 0x%016lx\n", inf->name, esr, addr); info...
@@ -173,7 +173,8 @@ static int __do_page_fault(struct mm_struct *mm, unsigned long addr, good_area: /* * Check that the permissions on the VMA allow for the fault which - * occurred. + * occurred. If we encountered a write or exec fault, we must have + * appropriate permissions, otherwise we allow any permissi...
CWE-19
null
null
46,824
asmlinkage void __exception do_sp_pc_abort(unsigned long addr, unsigned int esr, struct pt_regs *regs) { struct siginfo info; info.si_signo = SIGBUS; info.si_errno = 0; info.si_code = BUS_ADRALN; info.si_addr = (void __user *)addr; arm64_notify_die("", regs, &info, esr); }
+Priv
0
asmlinkage void __exception do_sp_pc_abort(unsigned long addr, unsigned int esr, struct pt_regs *regs) { struct siginfo info; info.si_signo = SIGBUS; info.si_errno = 0; info.si_code = BUS_ADRALN; info.si_addr = (void __user *)addr; arm64_notify_die("", regs, &info, esr); }
@@ -173,7 +173,8 @@ static int __do_page_fault(struct mm_struct *mm, unsigned long addr, good_area: /* * Check that the permissions on the VMA allow for the fault which - * occurred. + * occurred. If we encountered a write or exec fault, we must have + * appropriate permissions, otherwise we allow any permissi...
CWE-19
null
null
46,825
static int __kprobes do_translation_fault(unsigned long addr, unsigned int esr, struct pt_regs *regs) { if (addr < TASK_SIZE) return do_page_fault(addr, esr, regs); do_bad_area(addr, esr, regs); return 0; }
+Priv
0
static int __kprobes do_translation_fault(unsigned long addr, unsigned int esr, struct pt_regs *regs) { if (addr < TASK_SIZE) return do_page_fault(addr, esr, regs); do_bad_area(addr, esr, regs); return 0; }
@@ -173,7 +173,8 @@ static int __do_page_fault(struct mm_struct *mm, unsigned long addr, good_area: /* * Check that the permissions on the VMA allow for the fault which - * occurred. + * occurred. If we encountered a write or exec fault, we must have + * appropriate permissions, otherwise we allow any permissi...
CWE-19
null
null
46,826
static const char *fault_name(unsigned int esr) { const struct fault_info *inf = fault_info + (esr & 63); return inf->name; }
+Priv
0
static const char *fault_name(unsigned int esr) { const struct fault_info *inf = fault_info + (esr & 63); return inf->name; }
@@ -173,7 +173,8 @@ static int __do_page_fault(struct mm_struct *mm, unsigned long addr, good_area: /* * Check that the permissions on the VMA allow for the fault which - * occurred. + * occurred. If we encountered a write or exec fault, we must have + * appropriate permissions, otherwise we allow any permissi...
CWE-19
null
null
46,827
void __init hook_debug_fault_code(int nr, int (*fn)(unsigned long, unsigned int, struct pt_regs *), int sig, int code, const char *name) { BUG_ON(nr < 0 || nr >= ARRAY_SIZE(debug_fault_info)); debug_fault_info[nr].fn = fn; debug_fault_info[nr].sig = sig; debug_fault_info[nr].code = code; debug_fault_...
+Priv
0
void __init hook_debug_fault_code(int nr, int (*fn)(unsigned long, unsigned int, struct pt_regs *), int sig, int code, const char *name) { BUG_ON(nr < 0 || nr >= ARRAY_SIZE(debug_fault_info)); debug_fault_info[nr].fn = fn; debug_fault_info[nr].sig = sig; debug_fault_info[nr].code = code; debug_fault_...
@@ -173,7 +173,8 @@ static int __do_page_fault(struct mm_struct *mm, unsigned long addr, good_area: /* * Check that the permissions on the VMA allow for the fault which - * occurred. + * occurred. If we encountered a write or exec fault, we must have + * appropriate permissions, otherwise we allow any permissi...
CWE-19
null
null
46,828
void show_pte(struct mm_struct *mm, unsigned long addr) { pgd_t *pgd; if (!mm) mm = &init_mm; pr_alert("pgd = %p\n", mm->pgd); pgd = pgd_offset(mm, addr); pr_alert("[%08lx] *pgd=%016llx", addr, pgd_val(*pgd)); do { pud_t *pud; pmd_t *pmd; pte_t *pte; if (pgd_none(*pgd) || pgd_bad(*pgd)) break; ...
+Priv
0
void show_pte(struct mm_struct *mm, unsigned long addr) { pgd_t *pgd; if (!mm) mm = &init_mm; pr_alert("pgd = %p\n", mm->pgd); pgd = pgd_offset(mm, addr); pr_alert("[%08lx] *pgd=%016llx", addr, pgd_val(*pgd)); do { pud_t *pud; pmd_t *pmd; pte_t *pte; if (pgd_none(*pgd) || pgd_bad(*pgd)) break; ...
@@ -173,7 +173,8 @@ static int __do_page_fault(struct mm_struct *mm, unsigned long addr, good_area: /* * Check that the permissions on the VMA allow for the fault which - * occurred. + * occurred. If we encountered a write or exec fault, we must have + * appropriate permissions, otherwise we allow any permissi...
CWE-19
null
null
46,829
static int global_template_search(const char *key, void *data, void *privdata) { template_iter_t *iter = privdata; default_template_t *def_t = data; if (def_t->flags == iter->level) iter->res = key; return 0; }
null
0
static int global_template_search(const char *key, void *data, void *privdata) { template_iter_t *iter = privdata; default_template_t *def_t = data; if (def_t->flags == iter->level) iter->res = key; return 0; }
@@ -17,18 +17,35 @@ DECLARE_MODULE_V1 ); static void cs_cmd_flags(sourceinfo_t *si, int parc, char *parv[]); +static void check_registration_keywords(hook_user_register_check_t *hdata); command_t cs_flags = { "FLAGS", N_("Manipulates specific permissions on a channel."), AC_NONE, 3, cs_c...
CWE-284
null
null
46,830
BGD_DECLARE(gdImagePtr) gdImageScale(const gdImagePtr src, const unsigned int new_width, const unsigned int new_height) { gdImagePtr im_scaled = NULL; if (src == NULL || src->interpolation_id < 0 || src->interpolation_id > GD_METHOD_COUNT) { return 0; } switch (src->interpolation_id) { /*Special cases, optimi...
DoS
0
BGD_DECLARE(gdImagePtr) gdImageScale(const gdImagePtr src, const unsigned int new_width, const unsigned int new_height) { gdImagePtr im_scaled = NULL; if (src == NULL || src->interpolation_id < 0 || src->interpolation_id > GD_METHOD_COUNT) { return 0; } switch (src->interpolation_id) { /*Special cases, optimi...
@@ -953,9 +953,6 @@ static inline LineContribType *_gdContributionsCalc(unsigned int line_size, unsi double dTotalWeight = 0.0; int iSrc; - res->ContribRow[u].Left = iLeft; - res->ContribRow[u].Right = iRight; - /* Cut edge points to fit in filter window in case of spill-off */ if (iRight - iLeft + 1 > ...
CWE-125
null
null
46,831
BGD_DECLARE(gdImagePtr) gdImageRotateInterpolated(const gdImagePtr src, const float angle, int bgcolor) { /* round to two decimals and keep the 100x multiplication to use it in the common square angles case later. Keep the two decimal precisions so smaller rotation steps can be done, useful for slow animation...
DoS
0
BGD_DECLARE(gdImagePtr) gdImageRotateInterpolated(const gdImagePtr src, const float angle, int bgcolor) { /* round to two decimals and keep the 100x multiplication to use it in the common square angles case later. Keep the two decimal precisions so smaller rotation steps can be done, useful for slow animation...
@@ -953,9 +953,6 @@ static inline LineContribType *_gdContributionsCalc(unsigned int line_size, unsi double dTotalWeight = 0.0; int iSrc; - res->ContribRow[u].Left = iLeft; - res->ContribRow[u].Right = iRight; - /* Cut edge points to fit in filter window in case of spill-off */ if (iRight - iLeft + 1 > ...
CWE-125
null
null
46,832
gdImagePtr Scale(const gdImagePtr src, const unsigned int src_width, const unsigned int src_height, const gdImagePtr dst, const unsigned int new_width, const unsigned int new_height) { gdImagePtr tmp_im; tmp_im = gdImageCreateTrueColor(new_width, src_height); if (tmp_im == NULL) { return NULL; } _gdScaleHoriz(s...
DoS
0
gdImagePtr Scale(const gdImagePtr src, const unsigned int src_width, const unsigned int src_height, const gdImagePtr dst, const unsigned int new_width, const unsigned int new_height) { gdImagePtr tmp_im; tmp_im = gdImageCreateTrueColor(new_width, src_height); if (tmp_im == NULL) { return NULL; } _gdScaleHoriz(s...
@@ -953,9 +953,6 @@ static inline LineContribType *_gdContributionsCalc(unsigned int line_size, unsi double dTotalWeight = 0.0; int iSrc; - res->ContribRow[u].Left = iLeft; - res->ContribRow[u].Right = iRight; - /* Cut edge points to fit in filter window in case of spill-off */ if (iRight - iLeft + 1 > ...
CWE-125
null
null
46,833
static inline void _gdScaleCol (gdImagePtr pSrc, unsigned int src_width, gdImagePtr pRes, unsigned int dst_width, unsigned int dst_height, unsigned int uCol, LineContribType *contrib) { unsigned int y; for (y = 0; y < dst_height - 1; y++) { register unsigned char r = 0, g = 0, b = 0, a = 0; const int iLeft = con...
DoS
0
static inline void _gdScaleCol (gdImagePtr pSrc, unsigned int src_width, gdImagePtr pRes, unsigned int dst_width, unsigned int dst_height, unsigned int uCol, LineContribType *contrib) { unsigned int y; for (y = 0; y < dst_height - 1; y++) { register unsigned char r = 0, g = 0, b = 0, a = 0; const int iLeft = con...
@@ -953,9 +953,6 @@ static inline LineContribType *_gdContributionsCalc(unsigned int line_size, unsi double dTotalWeight = 0.0; int iSrc; - res->ContribRow[u].Left = iLeft; - res->ContribRow[u].Right = iRight; - /* Cut edge points to fit in filter window in case of spill-off */ if (iRight - iLeft + 1 > ...
CWE-125
null
null
46,834
static inline void _gdScaleVert (const gdImagePtr pSrc, const unsigned int src_width, const unsigned int src_height, const gdImagePtr pDst, const unsigned int dst_width, const unsigned int dst_height) { unsigned int u; LineContribType * contrib; /* same height, copy it */ if (src_height == dst_height) { unsigned...
DoS
0
static inline void _gdScaleVert (const gdImagePtr pSrc, const unsigned int src_width, const unsigned int src_height, const gdImagePtr pDst, const unsigned int dst_width, const unsigned int dst_height) { unsigned int u; LineContribType * contrib; /* same height, copy it */ if (src_height == dst_height) { unsigned...
@@ -953,9 +953,6 @@ static inline LineContribType *_gdContributionsCalc(unsigned int line_size, unsi double dTotalWeight = 0.0; int iSrc; - res->ContribRow[u].Left = iLeft; - res->ContribRow[u].Right = iRight; - /* Cut edge points to fit in filter window in case of spill-off */ if (iRight - iLeft + 1 > ...
CWE-125
null
null
46,835
gdImagePtr gdImageRotateBicubicFixed(gdImagePtr src, const float degrees, const int bgColor) { const float _angle = (float)((- degrees / 180.0f) * M_PI); const int src_w = gdImageSX(src); const int src_h = gdImageSY(src); const unsigned int new_width = abs((int)(src_w*cos(_angle))) + abs((int)(src_h*sin(_angle) + 0...
DoS
0
gdImagePtr gdImageRotateBicubicFixed(gdImagePtr src, const float degrees, const int bgColor) { const float _angle = (float)((- degrees / 180.0f) * M_PI); const int src_w = gdImageSX(src); const int src_h = gdImageSY(src); const unsigned int new_width = abs((int)(src_w*cos(_angle))) + abs((int)(src_h*sin(_angle) + 0...
@@ -953,9 +953,6 @@ static inline LineContribType *_gdContributionsCalc(unsigned int line_size, unsi double dTotalWeight = 0.0; int iSrc; - res->ContribRow[u].Left = iLeft; - res->ContribRow[u].Right = iRight; - /* Cut edge points to fit in filter window in case of spill-off */ if (iRight - iLeft + 1 > ...
CWE-125
null
null
46,836
gdImagePtr gdImageRotateGeneric(gdImagePtr src, const float degrees, const int bgColor) { float _angle = ((float) (-degrees / 180.0f) * (float)M_PI); const int src_w = gdImageSX(src); const int src_h = gdImageSY(src); const unsigned int new_width = (unsigned int)(abs((int)(src_w * cos(_angle))) + abs((int)(src_h *...
DoS
0
gdImagePtr gdImageRotateGeneric(gdImagePtr src, const float degrees, const int bgColor) { float _angle = ((float) (-degrees / 180.0f) * (float)M_PI); const int src_w = gdImageSX(src); const int src_h = gdImageSY(src); const unsigned int new_width = (unsigned int)(abs((int)(src_w * cos(_angle))) + abs((int)(src_h *...
@@ -953,9 +953,6 @@ static inline LineContribType *_gdContributionsCalc(unsigned int line_size, unsi double dTotalWeight = 0.0; int iSrc; - res->ContribRow[u].Left = iLeft; - res->ContribRow[u].Right = iRight; - /* Cut edge points to fit in filter window in case of spill-off */ if (iRight - iLeft + 1 > ...
CWE-125
null
null
46,837
gdImagePtr gdImageRotateNearestNeighbour(gdImagePtr src, const float degrees, const int bgColor) { float _angle = ((float) (-degrees / 180.0f) * (float)M_PI); const int src_w = gdImageSX(src); const int src_h = gdImageSY(src); const unsigned int new_width = (unsigned int)(abs((int)(src_w * cos(_angle))) + abs((int...
DoS
0
gdImagePtr gdImageRotateNearestNeighbour(gdImagePtr src, const float degrees, const int bgColor) { float _angle = ((float) (-degrees / 180.0f) * (float)M_PI); const int src_w = gdImageSX(src); const int src_h = gdImageSY(src); const unsigned int new_width = (unsigned int)(abs((int)(src_w * cos(_angle))) + abs((int...
@@ -953,9 +953,6 @@ static inline LineContribType *_gdContributionsCalc(unsigned int line_size, unsi double dTotalWeight = 0.0; int iSrc; - res->ContribRow[u].Left = iLeft; - res->ContribRow[u].Right = iRight; - /* Cut edge points to fit in filter window in case of spill-off */ if (iRight - iLeft + 1 > ...
CWE-125
null
null
46,838
gdImagePtr gdImageScaleBicubicFixed(gdImagePtr src, const unsigned int width, const unsigned int height) { const long new_width = MAX(1, width); const long new_height = MAX(1, height); const int src_w = gdImageSX(src); const int src_h = gdImageSY(src); const gdFixed f_dx = gd_ftofx((float)src_w / (float)new_width)...
DoS
0
gdImagePtr gdImageScaleBicubicFixed(gdImagePtr src, const unsigned int width, const unsigned int height) { const long new_width = MAX(1, width); const long new_height = MAX(1, height); const int src_w = gdImageSX(src); const int src_h = gdImageSY(src); const gdFixed f_dx = gd_ftofx((float)src_w / (float)new_width)...
@@ -953,9 +953,6 @@ static inline LineContribType *_gdContributionsCalc(unsigned int line_size, unsi double dTotalWeight = 0.0; int iSrc; - res->ContribRow[u].Left = iLeft; - res->ContribRow[u].Right = iRight; - /* Cut edge points to fit in filter window in case of spill-off */ if (iRight - iLeft + 1 > ...
CWE-125
null
null
46,839
gdImagePtr gdImageScaleBilinear(gdImagePtr im, const unsigned int new_width, const unsigned int new_height) { if (im->trueColor) { return gdImageScaleBilinearTC(im, new_width, new_height); } else { return gdImageScaleBilinearPalette(im, new_width, new_height); } }
DoS
0
gdImagePtr gdImageScaleBilinear(gdImagePtr im, const unsigned int new_width, const unsigned int new_height) { if (im->trueColor) { return gdImageScaleBilinearTC(im, new_width, new_height); } else { return gdImageScaleBilinearPalette(im, new_width, new_height); } }
@@ -953,9 +953,6 @@ static inline LineContribType *_gdContributionsCalc(unsigned int line_size, unsi double dTotalWeight = 0.0; int iSrc; - res->ContribRow[u].Left = iLeft; - res->ContribRow[u].Right = iRight; - /* Cut edge points to fit in filter window in case of spill-off */ if (iRight - iLeft + 1 > ...
CWE-125
null
null
46,840
static gdImagePtr gdImageScaleBilinearTC(gdImagePtr im, const unsigned int new_width, const unsigned int new_height) { long dst_w = MAX(1, new_width); long dst_h = MAX(1, new_height); float dx = (float)gdImageSX(im) / (float)dst_w; float dy = (float)gdImageSY(im) / (float)dst_h; gdFixed f_dx = gd_ftofx(dx); gdFix...
DoS
0
static gdImagePtr gdImageScaleBilinearTC(gdImagePtr im, const unsigned int new_width, const unsigned int new_height) { long dst_w = MAX(1, new_width); long dst_h = MAX(1, new_height); float dx = (float)gdImageSX(im) / (float)dst_w; float dy = (float)gdImageSY(im) / (float)dst_h; gdFixed f_dx = gd_ftofx(dx); gdFix...
@@ -953,9 +953,6 @@ static inline LineContribType *_gdContributionsCalc(unsigned int line_size, unsi double dTotalWeight = 0.0; int iSrc; - res->ContribRow[u].Left = iLeft; - res->ContribRow[u].Right = iRight; - /* Cut edge points to fit in filter window in case of spill-off */ if (iRight - iLeft + 1 > ...
CWE-125
null
null
46,841
gdImagePtr gdImageScaleTwoPass(const gdImagePtr src, const unsigned int src_width, const unsigned int src_height, const unsigned int new_width, const unsigned int new_height) { gdImagePtr tmp_im; gdImagePtr dst; tmp_im = gdImageCreateTrueColor(new_width, src_height); if (tmp_im == NULL) { return NULL; } gdImag...
DoS
0
gdImagePtr gdImageScaleTwoPass(const gdImagePtr src, const unsigned int src_width, const unsigned int src_height, const unsigned int new_width, const unsigned int new_height) { gdImagePtr tmp_im; gdImagePtr dst; tmp_im = gdImageCreateTrueColor(new_width, src_height); if (tmp_im == NULL) { return NULL; } gdImag...
@@ -953,9 +953,6 @@ static inline LineContribType *_gdContributionsCalc(unsigned int line_size, unsi double dTotalWeight = 0.0; int iSrc; - res->ContribRow[u].Left = iLeft; - res->ContribRow[u].Right = iRight; - /* Cut edge points to fit in filter window in case of spill-off */ if (iRight - iLeft + 1 > ...
CWE-125
null
null
46,842
BGD_DECLARE(int) gdImageSetInterpolationMethod(gdImagePtr im, gdInterpolationMethod id) { if (im == NULL || id < 0 || id > GD_METHOD_COUNT) { return 0; } switch (id) { case GD_DEFAULT: im->interpolation_id = GD_BILINEAR_FIXED; im->interpolation = NULL; break; /* Optimized versions */ case GD_BILIN...
DoS
0
BGD_DECLARE(int) gdImageSetInterpolationMethod(gdImagePtr im, gdInterpolationMethod id) { if (im == NULL || id < 0 || id > GD_METHOD_COUNT) { return 0; } switch (id) { case GD_DEFAULT: im->interpolation_id = GD_BILINEAR_FIXED; im->interpolation = NULL; break; /* Optimized versions */ case GD_BILIN...
@@ -953,9 +953,6 @@ static inline LineContribType *_gdContributionsCalc(unsigned int line_size, unsi double dTotalWeight = 0.0; int iSrc; - res->ContribRow[u].Left = iLeft; - res->ContribRow[u].Right = iRight; - /* Cut edge points to fit in filter window in case of spill-off */ if (iRight - iLeft + 1 > ...
CWE-125
null
null
46,843
cmsBool AddConversion(cmsPipeline* Result, cmsColorSpaceSignature InPCS, cmsColorSpaceSignature OutPCS, cmsMAT3* m, cmsVEC3* off) { cmsFloat64Number* m_as_dbl = (cmsFloat64Number*) m; cmsFloat64Number* off_as_dbl = (cmsFloat64Number*) off; switch (InPCS) { case cmsSigXYZData: // Input profile operates...
Exec Code
0
cmsBool AddConversion(cmsPipeline* Result, cmsColorSpaceSignature InPCS, cmsColorSpaceSignature OutPCS, cmsMAT3* m, cmsVEC3* off) { cmsFloat64Number* m_as_dbl = (cmsFloat64Number*) m; cmsFloat64Number* off_as_dbl = (cmsFloat64Number*) off; switch (InPCS) { case cmsSigXYZData: // Input profile operates...
@@ -571,7 +571,9 @@ cmsPipeline* DefaultICCintents(cmsContext ContextID, // Concatenate to the output LUT if (!cmsPipelineCat(Result, Lut)) goto Error; + cmsPipelineFree(Lut); + Lut = NULL; // Update current space CurrentColorSpace = ColorSpaceOut...
null
null
null
46,844
cmsPipeline* BlackPreservingKOnlyIntents(cmsContext ContextID, cmsUInt32Number nProfiles, cmsUInt32Number TheIntents[], cmsHPROFILE hProfiles[], ...
Exec Code
0
cmsPipeline* BlackPreservingKOnlyIntents(cmsContext ContextID, cmsUInt32Number nProfiles, cmsUInt32Number TheIntents[], cmsHPROFILE hProfiles[], ...
@@ -571,7 +571,9 @@ cmsPipeline* DefaultICCintents(cmsContext ContextID, // Concatenate to the output LUT if (!cmsPipelineCat(Result, Lut)) goto Error; + cmsPipelineFree(Lut); + Lut = NULL; // Update current space CurrentColorSpace = ColorSpaceOut...
null
null
null
46,845
cmsPipeline* BlackPreservingKPlaneIntents(cmsContext ContextID, cmsUInt32Number nProfiles, cmsUInt32Number TheIntents[], cmsHPROFILE hProfiles[], ...
Exec Code
0
cmsPipeline* BlackPreservingKPlaneIntents(cmsContext ContextID, cmsUInt32Number nProfiles, cmsUInt32Number TheIntents[], cmsHPROFILE hProfiles[], ...
@@ -571,7 +571,9 @@ cmsPipeline* DefaultICCintents(cmsContext ContextID, // Concatenate to the output LUT if (!cmsPipelineCat(Result, Lut)) goto Error; + cmsPipelineFree(Lut); + Lut = NULL; // Update current space CurrentColorSpace = ColorSpaceOut...
null
null
null
46,846
cmsFloat64Number CHAD2Temp(const cmsMAT3* Chad) { cmsVEC3 d, s; cmsCIEXYZ Dest; cmsCIExyY DestChromaticity; cmsFloat64Number TempK; cmsMAT3 m1, m2; m1 = *Chad; if (!_cmsMAT3inverse(&m1, &m2)) return FALSE; s.n[VX] = cmsD50_XYZ() -> X; s.n[VY] = cmsD50_XYZ() -> Y; s.n[VZ] = cmsD...
Exec Code
0
cmsFloat64Number CHAD2Temp(const cmsMAT3* Chad) { cmsVEC3 d, s; cmsCIEXYZ Dest; cmsCIExyY DestChromaticity; cmsFloat64Number TempK; cmsMAT3 m1, m2; m1 = *Chad; if (!_cmsMAT3inverse(&m1, &m2)) return FALSE; s.n[VX] = cmsD50_XYZ() -> X; s.n[VY] = cmsD50_XYZ() -> Y; s.n[VZ] = cmsD...
@@ -571,7 +571,9 @@ cmsPipeline* DefaultICCintents(cmsContext ContextID, // Concatenate to the output LUT if (!cmsPipelineCat(Result, Lut)) goto Error; + cmsPipelineFree(Lut); + Lut = NULL; // Update current space CurrentColorSpace = ColorSpaceOut...
null
null
null
46,847
cmsBool ColorSpaceIsCompatible(cmsColorSpaceSignature a, cmsColorSpaceSignature b) { if (a == b) return TRUE; if ((a == cmsSig4colorData) && (b == cmsSigCmykData)) return TRUE; if ((a == cmsSigCmykData) && (b == cmsSig4colorData)) return TRUE; if ((a == cmsSigXYZData) && (b == cmsSigLabData)) return T...
Exec Code
0
cmsBool ColorSpaceIsCompatible(cmsColorSpaceSignature a, cmsColorSpaceSignature b) { if (a == b) return TRUE; if ((a == cmsSig4colorData) && (b == cmsSigCmykData)) return TRUE; if ((a == cmsSigCmykData) && (b == cmsSig4colorData)) return TRUE; if ((a == cmsSigXYZData) && (b == cmsSigLabData)) return T...
@@ -571,7 +571,9 @@ cmsPipeline* DefaultICCintents(cmsContext ContextID, // Concatenate to the output LUT if (!cmsPipelineCat(Result, Lut)) goto Error; + cmsPipelineFree(Lut); + Lut = NULL; // Update current space CurrentColorSpace = ColorSpaceOut...
null
null
null
46,848
cmsBool ComputeAbsoluteIntent(cmsFloat64Number AdaptationState, const cmsCIEXYZ* WhitePointIn, const cmsMAT3* ChromaticAdaptationMatrixIn, const cmsCIEXYZ* WhitePointOut, const cmsMAT3* Chromatic...
Exec Code
0
cmsBool ComputeAbsoluteIntent(cmsFloat64Number AdaptationState, const cmsCIEXYZ* WhitePointIn, const cmsMAT3* ChromaticAdaptationMatrixIn, const cmsCIEXYZ* WhitePointOut, const cmsMAT3* Chromatic...
@@ -571,7 +571,9 @@ cmsPipeline* DefaultICCintents(cmsContext ContextID, // Concatenate to the output LUT if (!cmsPipelineCat(Result, Lut)) goto Error; + cmsPipelineFree(Lut); + Lut = NULL; // Update current space CurrentColorSpace = ColorSpaceOut...
null
null
null
46,849
void ComputeBlackPointCompensation(const cmsCIEXYZ* BlackPointIn, const cmsCIEXYZ* BlackPointOut, cmsMAT3* m, cmsVEC3* off) { cmsFloat64Number ax, ay, az, bx, by, bz, tx, ty, tz; tx = BlackPointIn->X - cmsD50_XYZ()->X; ty = BlackPointIn->Y ...
Exec Code
0
void ComputeBlackPointCompensation(const cmsCIEXYZ* BlackPointIn, const cmsCIEXYZ* BlackPointOut, cmsMAT3* m, cmsVEC3* off) { cmsFloat64Number ax, ay, az, bx, by, bz, tx, ty, tz; tx = BlackPointIn->X - cmsD50_XYZ()->X; ty = BlackPointIn->Y ...
@@ -571,7 +571,9 @@ cmsPipeline* DefaultICCintents(cmsContext ContextID, // Concatenate to the output LUT if (!cmsPipelineCat(Result, Lut)) goto Error; + cmsPipelineFree(Lut); + Lut = NULL; // Update current space CurrentColorSpace = ColorSpaceOut...
null
null
null
46,850
cmsBool IsEmptyLayer(cmsMAT3* m, cmsVEC3* off) { cmsFloat64Number diff = 0; cmsMAT3 Ident; int i; if (m == NULL && off == NULL) return TRUE; // NULL is allowed as an empty layer if (m == NULL && off != NULL) return FALSE; // This is an internal error _cmsMAT3identity(&Ident); for (i=0; i...
Exec Code
0
cmsBool IsEmptyLayer(cmsMAT3* m, cmsVEC3* off) { cmsFloat64Number diff = 0; cmsMAT3 Ident; int i; if (m == NULL && off == NULL) return TRUE; // NULL is allowed as an empty layer if (m == NULL && off != NULL) return FALSE; // This is an internal error _cmsMAT3identity(&Ident); for (i=0; i...
@@ -571,7 +571,9 @@ cmsPipeline* DefaultICCintents(cmsContext ContextID, // Concatenate to the output LUT if (!cmsPipelineCat(Result, Lut)) goto Error; + cmsPipelineFree(Lut); + Lut = NULL; // Update current space CurrentColorSpace = ColorSpaceOut...
null
null
null
46,851
cmsIntentsList* SearchIntent(cmsUInt32Number Intent) { cmsIntentsList* pt; for (pt = Intents; pt != NULL; pt = pt -> Next) if (pt ->Intent == Intent) return pt; return NULL; }
Exec Code
0
cmsIntentsList* SearchIntent(cmsUInt32Number Intent) { cmsIntentsList* pt; for (pt = Intents; pt != NULL; pt = pt -> Next) if (pt ->Intent == Intent) return pt; return NULL; }
@@ -571,7 +571,9 @@ cmsPipeline* DefaultICCintents(cmsContext ContextID, // Concatenate to the output LUT if (!cmsPipelineCat(Result, Lut)) goto Error; + cmsPipelineFree(Lut); + Lut = NULL; // Update current space CurrentColorSpace = ColorSpaceOut...
null
null
null
46,852
void Temp2CHAD(cmsMAT3* Chad, cmsFloat64Number Temp) { cmsCIEXYZ White; cmsCIExyY ChromaticityOfWhite; cmsWhitePointFromTemp(&ChromaticityOfWhite, Temp); cmsxyY2XYZ(&White, &ChromaticityOfWhite); _cmsAdaptationMatrix(Chad, NULL, &White, cmsD50_XYZ()); }
Exec Code
0
void Temp2CHAD(cmsMAT3* Chad, cmsFloat64Number Temp) { cmsCIEXYZ White; cmsCIExyY ChromaticityOfWhite; cmsWhitePointFromTemp(&ChromaticityOfWhite, Temp); cmsxyY2XYZ(&White, &ChromaticityOfWhite); _cmsAdaptationMatrix(Chad, NULL, &White, cmsD50_XYZ()); }
@@ -571,7 +571,9 @@ cmsPipeline* DefaultICCintents(cmsContext ContextID, // Concatenate to the output LUT if (!cmsPipelineCat(Result, Lut)) goto Error; + cmsPipelineFree(Lut); + Lut = NULL; // Update current space CurrentColorSpace = ColorSpaceOut...
null
null
null
46,853
int TranslateNonICCIntents(int Intent) { switch (Intent) { case INTENT_PRESERVE_K_ONLY_PERCEPTUAL: case INTENT_PRESERVE_K_PLANE_PERCEPTUAL: return INTENT_PERCEPTUAL; case INTENT_PRESERVE_K_ONLY_RELATIVE_COLORIMETRIC: case INTENT_PRESERVE_K_PLANE_RELATIVE_COLORIMETRIC: ...
Exec Code
0
int TranslateNonICCIntents(int Intent) { switch (Intent) { case INTENT_PRESERVE_K_ONLY_PERCEPTUAL: case INTENT_PRESERVE_K_PLANE_PERCEPTUAL: return INTENT_PERCEPTUAL; case INTENT_PRESERVE_K_ONLY_RELATIVE_COLORIMETRIC: case INTENT_PRESERVE_K_PLANE_RELATIVE_COLORIMETRIC: ...
@@ -571,7 +571,9 @@ cmsPipeline* DefaultICCintents(cmsContext ContextID, // Concatenate to the output LUT if (!cmsPipelineCat(Result, Lut)) goto Error; + cmsPipelineFree(Lut); + Lut = NULL; // Update current space CurrentColorSpace = ColorSpaceOut...
null
null
null
46,854
cmsPipeline* CMSEXPORT _cmsDefaultICCintents(cmsContext ContextID, cmsUInt32Number nProfiles, cmsUInt32Number TheIntents[], cmsHPROFILE hProfiles[], ...
Exec Code
0
cmsPipeline* CMSEXPORT _cmsDefaultICCintents(cmsContext ContextID, cmsUInt32Number nProfiles, cmsUInt32Number TheIntents[], cmsHPROFILE hProfiles[], ...
@@ -571,7 +571,9 @@ cmsPipeline* DefaultICCintents(cmsContext ContextID, // Concatenate to the output LUT if (!cmsPipelineCat(Result, Lut)) goto Error; + cmsPipelineFree(Lut); + Lut = NULL; // Update current space CurrentColorSpace = ColorSpaceOut...
null
null
null
46,855
cmsPipeline* _cmsLinkProfiles(cmsContext ContextID, cmsUInt32Number nProfiles, cmsUInt32Number TheIntents[], cmsHPROFILE hProfiles[], cmsBool BPC[], cmsFl...
Exec Code
0
cmsPipeline* _cmsLinkProfiles(cmsContext ContextID, cmsUInt32Number nProfiles, cmsUInt32Number TheIntents[], cmsHPROFILE hProfiles[], cmsBool BPC[], cmsFl...
@@ -571,7 +571,9 @@ cmsPipeline* DefaultICCintents(cmsContext ContextID, // Concatenate to the output LUT if (!cmsPipelineCat(Result, Lut)) goto Error; + cmsPipelineFree(Lut); + Lut = NULL; // Update current space CurrentColorSpace = ColorSpaceOut...
null
null
null
46,856
cmsUInt32Number CMSEXPORT cmsGetSupportedIntents(cmsUInt32Number nMax, cmsUInt32Number* Codes, char** Descriptions) { cmsIntentsList* pt; cmsUInt32Number nIntents; for (nIntents=0, pt = Intents; pt != NULL; pt = pt -> Next) { if (nIntents < nMax) { if (Codes != NULL) ...
Exec Code
0
cmsUInt32Number CMSEXPORT cmsGetSupportedIntents(cmsUInt32Number nMax, cmsUInt32Number* Codes, char** Descriptions) { cmsIntentsList* pt; cmsUInt32Number nIntents; for (nIntents=0, pt = Intents; pt != NULL; pt = pt -> Next) { if (nIntents < nMax) { if (Codes != NULL) ...
@@ -571,7 +571,9 @@ cmsPipeline* DefaultICCintents(cmsContext ContextID, // Concatenate to the output LUT if (!cmsPipelineCat(Result, Lut)) goto Error; + cmsPipelineFree(Lut); + Lut = NULL; // Update current space CurrentColorSpace = ColorSpaceOut...
null
null
null
46,857
auto_reconnect (server *serv, int send_quit, int err) { session *s; GSList *list; int del; if (serv->server_session == NULL) return; list = sess_list; while (list) /* make sure auto rejoin can work */ { s = list->data; if (s->type == SESS_CHANNEL && s->channel[0]) { strcpy (s->waitchannel, s->c...
null
0
auto_reconnect (server *serv, int send_quit, int err) { session *s; GSList *list; int del; if (serv->server_session == NULL) return; list = sess_list; while (list) /* make sure auto rejoin can work */ { s = list->data; if (s->type == SESS_CHANNEL && s->channel[0]) { strcpy (s->waitchannel, s->c...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,858
base64_encode (char *to, char *from, unsigned int len) { while (len >= 3) { three_to_four (from, to); len -= 3; from += 3; to += 4; } if (len) { char three[3] = {0,0,0}; unsigned int i; for (i = 0; i < len; i++) { three[i] = *from++; } three_to_four (three, to); if (len == 1) { to[2] ...
null
0
base64_encode (char *to, char *from, unsigned int len) { while (len >= 3) { three_to_four (from, to); len -= 3; from += 3; to += 4; } if (len) { char three[3] = {0,0,0}; unsigned int i; for (i = 0; i < len; i++) { three[i] = *from++; } three_to_four (three, to); if (len == 1) { to[2] ...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,859
close_socket (int sok) { /* close the socket in 5 seconds so the QUIT message is not lost */ fe_timeout_add (5000, close_socket_cb, GINT_TO_POINTER (sok)); }
null
0
close_socket (int sok) { /* close the socket in 5 seconds so the QUIT message is not lost */ fe_timeout_add (5000, close_socket_cb, GINT_TO_POINTER (sok)); }
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,860
http_read_line (int print_fd, int sok, char *buf, int len) { len = waitline (sok, buf, len, TRUE); if (len >= 1) { /* print the message out (send it to the parent process) */ write (print_fd, "0\n", 2); if (buf[len-1] == '\r') { buf[len-1] = '\n'; write (print_fd, buf, len); } else { write (pri...
null
0
http_read_line (int print_fd, int sok, char *buf, int len) { len = waitline (sok, buf, len, TRUE); if (len >= 1) { /* print the message out (send it to the parent process) */ write (print_fd, "0\n", 2); if (buf[len-1] == '\r') { buf[len-1] = '\n'; write (print_fd, buf, len); } else { write (pri...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,861
is_server (server *serv) { return g_slist_find (serv_list, serv) ? 1 : 0; }
null
0
is_server (server *serv) { return g_slist_find (serv_list, serv) ? 1 : 0; }
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,862
proxy_error (int fd, char *msg) { write (fd, "0\n", 2); write (fd, msg, strlen (msg)); }
null
0
proxy_error (int fd, char *msg) { write (fd, "0\n", 2); write (fd, msg, strlen (msg)); }
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,863
server_away_save_message (server *serv, char *nick, char *msg) { struct away_msg *away = server_away_find_message (serv, nick); if (away) /* Change message for known user */ { if (away->message) free (away->message); away->message = strdup (msg); } else /* Create brand new entry */ { away = mall...
null
0
server_away_save_message (server *serv, char *nick, char *msg) { struct away_msg *away = server_away_find_message (serv, nick); if (away) /* Change message for known user */ { if (away->message) free (away->message); away->message = strdup (msg); } else /* Create brand new entry */ { away = mall...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,864
server_child (server * serv) { netstore *ns_server; netstore *ns_proxy = NULL; netstore *ns_local; int port = serv->port; int error; int sok, psok; char *hostname = serv->hostname; char *real_hostname = NULL; char *ip; char *proxy_ip = NULL; char *local_ip; int connect_port; char buf[512]; char bound = 0;...
null
0
server_child (server * serv) { netstore *ns_server; netstore *ns_proxy = NULL; netstore *ns_local; int port = serv->port; int error; int sok, psok; char *hostname = serv->hostname; char *real_hostname = NULL; char *ip; char *proxy_ip = NULL; char *local_ip; int connect_port; char buf[512]; char bound = 0;...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,865
server_cleanup (server * serv) { fe_set_lag (serv, 0); if (serv->iotag) { fe_input_remove (serv->iotag); serv->iotag = 0; } if (serv->joindelay_tag) { fe_timeout_remove (serv->joindelay_tag); serv->joindelay_tag = 0; } #ifdef USE_OPENSSL if (serv->ssl) { SSL_shutdown (serv->ssl); SSL_free (serv-...
null
0
server_cleanup (server * serv) { fe_set_lag (serv, 0); if (serv->iotag) { fe_input_remove (serv->iotag); serv->iotag = 0; } if (serv->joindelay_tag) { fe_timeout_remove (serv->joindelay_tag); serv->joindelay_tag = 0; } #ifdef USE_OPENSSL if (serv->ssl) { SSL_shutdown (serv->ssl); SSL_free (serv-...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,866
server_connect (server *serv, char *hostname, int port, int no_login) { int pid, read_des[2]; session *sess = serv->server_session; #ifdef USE_OPENSSL if (!serv->ctx && serv->use_ssl) { if (!(serv->ctx = _SSL_context_init (ssl_cb_info, FALSE))) { fprintf (stderr, "_SSL_context_init failed\n"); exit (1); ...
null
0
server_connect (server *serv, char *hostname, int port, int no_login) { int pid, read_des[2]; session *sess = serv->server_session; #ifdef USE_OPENSSL if (!serv->ctx && serv->use_ssl) { if (!(serv->ctx = _SSL_context_init (ssl_cb_info, FALSE))) { fprintf (stderr, "_SSL_context_init failed\n"); exit (1); ...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,867
server_disconnect (session * sess, int sendquit, int err) { server *serv = sess->server; GSList *list; char tbuf[64]; gboolean shutup = FALSE; /* send our QUIT reason */ if (sendquit && serv->connected) { server_sendquit (sess); } fe_server_event (serv, FE_SE_DISCONNECT, 0); /* close all sockets & io tag...
null
0
server_disconnect (session * sess, int sendquit, int err) { server *serv = sess->server; GSList *list; char tbuf[64]; gboolean shutup = FALSE; /* send our QUIT reason */ if (sendquit && serv->connected) { server_sendquit (sess); } fe_server_event (serv, FE_SE_DISCONNECT, 0); /* close all sockets & io tag...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,868
server_fill_her_up (server *serv) { serv->connect = server_connect; serv->disconnect = server_disconnect; serv->cleanup = server_cleanup; serv->flush_queue = server_flush_queue; serv->auto_reconnect = auto_reconnect; proto_fill_her_up (serv); }
null
0
server_fill_her_up (server *serv) { serv->connect = server_connect; serv->disconnect = server_disconnect; serv->cleanup = server_cleanup; serv->flush_queue = server_flush_queue; serv->auto_reconnect = auto_reconnect; proto_fill_her_up (serv); }
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,869
server_flush_queue (server *serv) { list_free (&serv->outbound_queue); serv->sendq_len = 0; fe_set_throttle (serv); }
null
0
server_flush_queue (server *serv) { list_free (&serv->outbound_queue); serv->sendq_len = 0; fe_set_throttle (serv); }
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,870
server_free (server *serv) { serv->cleanup (serv); serv_list = g_slist_remove (serv_list, serv); dcc_notify_kill (serv); serv->flush_queue (serv); server_away_free_messages (serv); free (serv->nick_modes); free (serv->nick_prefixes); free (serv->chanmodes); free (serv->chantypes); if (serv->bad_nick_prefix...
null
0
server_free (server *serv) { serv->cleanup (serv); serv_list = g_slist_remove (serv_list, serv); dcc_notify_kill (serv); serv->flush_queue (serv); server_away_free_messages (serv); free (serv->nick_modes); free (serv->nick_prefixes); free (serv->chanmodes); free (serv->chantypes); if (serv->bad_nick_prefix...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,871
server_get_network (server *serv, gboolean fallback) { /* check the network list */ if (serv->network) return ((ircnet *)serv->network)->name; /* check the network name given in 005 NETWORK=... */ if (serv->server_session && *serv->server_session->channel) return serv->server_session->channel; if (fallback) ...
null
0
server_get_network (server *serv, gboolean fallback) { /* check the network list */ if (serv->network) return ((ircnet *)serv->network)->name; /* check the network name given in 005 NETWORK=... */ if (serv->server_session && *serv->server_session->channel) return serv->server_session->channel; if (fallback) ...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,872
server_new (void) { static int id = 0; server *serv; serv = malloc (sizeof (struct server)); memset (serv, 0, sizeof (struct server)); /* use server.c and proto-irc.c functions */ server_fill_her_up (serv); serv->id = id++; serv->sok = -1; strcpy (serv->nick, prefs.hex_irc_nick1); server_set_defaults (serv...
null
0
server_new (void) { static int id = 0; server *serv; serv = malloc (sizeof (struct server)); memset (serv, 0, sizeof (struct server)); /* use server.c and proto-irc.c functions */ server_fill_her_up (serv); serv->id = id++; serv->sok = -1; strcpy (serv->nick, prefs.hex_irc_nick1); server_set_defaults (serv...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,873
server_read (GIOChannel *source, GIOCondition condition, server *serv) { int sok = serv->sok; int error, i, len; char lbuf[2050]; while (1) { #ifdef USE_OPENSSL if (!serv->ssl) #endif len = recv (sok, lbuf, sizeof (lbuf) - 2, 0); #ifdef USE_OPENSSL else len = _SSL_recv (serv->ssl, lbuf, sizeof (lbuf) - ...
null
0
server_read (GIOChannel *source, GIOCondition condition, server *serv) { int sok = serv->sok; int error, i, len; char lbuf[2050]; while (1) { #ifdef USE_OPENSSL if (!serv->ssl) #endif len = recv (sok, lbuf, sizeof (lbuf) - 2, 0); #ifdef USE_OPENSSL else len = _SSL_recv (serv->ssl, lbuf, sizeof (lbuf) - ...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,874
server_read_child (GIOChannel *source, GIOCondition condition, server *serv) { session *sess = serv->server_session; char tbuf[128]; char outbuf[512]; char host[100]; char ip[100]; #ifdef USE_MSPROXY char *p; #endif waitline2 (source, tbuf, sizeof tbuf); switch (tbuf[0]) { case '0': /* print some text */ ...
null
0
server_read_child (GIOChannel *source, GIOCondition condition, server *serv) { session *sess = serv->server_session; char tbuf[128]; char outbuf[512]; char host[100]; char ip[100]; #ifdef USE_MSPROXY char *p; #endif waitline2 (source, tbuf, sizeof tbuf); switch (tbuf[0]) { case '0': /* print some text */ ...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,875
server_send_real (server *serv, char *buf, int len) { fe_add_rawlog (serv, buf, len, TRUE); url_check_line (buf, len); return tcp_send_real (serv->ssl, serv->sok, serv->encoding, serv->using_irc, buf, len); }
null
0
server_send_real (server *serv, char *buf, int len) { fe_add_rawlog (serv, buf, len, TRUE); url_check_line (buf, len); return tcp_send_real (serv->ssl, serv->sok, serv->encoding, serv->using_irc, buf, len); }
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,876
server_set_defaults (server *serv) { if (serv->chantypes) free (serv->chantypes); if (serv->chanmodes) free (serv->chanmodes); if (serv->nick_prefixes) free (serv->nick_prefixes); if (serv->nick_modes) free (serv->nick_modes); serv->chantypes = strdup ("#&!+"); serv->chanmodes = strdup ("beI,k,l"); serv...
null
0
server_set_defaults (server *serv) { if (serv->chantypes) free (serv->chantypes); if (serv->chanmodes) free (serv->chanmodes); if (serv->nick_prefixes) free (serv->nick_prefixes); if (serv->nick_modes) free (serv->nick_modes); serv->chantypes = strdup ("#&!+"); serv->chanmodes = strdup ("beI,k,l"); serv...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,877
server_set_name (server *serv, char *name) { GSList *list = sess_list; session *sess; if (name[0] == 0) name = serv->hostname; /* strncpy parameters must NOT overlap */ if (name != serv->servername) { safe_strcpy (serv->servername, name, sizeof (serv->servername)); } while (list) { sess = (session *) ...
null
0
server_set_name (server *serv, char *name) { GSList *list = sess_list; session *sess; if (name[0] == 0) name = serv->hostname; /* strncpy parameters must NOT overlap */ if (name != serv->servername) { safe_strcpy (serv->servername, name, sizeof (serv->servername)); } while (list) { sess = (session *) ...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,878
server_stopconnecting (server * serv) { if (serv->iotag) { fe_input_remove (serv->iotag); serv->iotag = 0; } if (serv->joindelay_tag) { fe_timeout_remove (serv->joindelay_tag); serv->joindelay_tag = 0; } #ifndef WIN32 /* kill the child process trying to connect */ kill (serv->childpid, SIGKILL); wait...
null
0
server_stopconnecting (server * serv) { if (serv->iotag) { fe_input_remove (serv->iotag); serv->iotag = 0; } if (serv->joindelay_tag) { fe_timeout_remove (serv->joindelay_tag); serv->joindelay_tag = 0; } #ifndef WIN32 /* kill the child process trying to connect */ kill (serv->childpid, SIGKILL); wait...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,879
ssl_cb_info (SSL * s, int where, int ret) { /* char buf[128];*/ return; /* FIXME: make debug level adjustable in serverlist or settings */ /* snprintf (buf, sizeof (buf), "%s (%d)", SSL_state_string_long (s), where); if (g_sess) EMIT_SIGNAL (XP_TE_SSLMESSAGE, g_sess, buf, NULL, NULL, NULL, 0); else fp...
null
0
ssl_cb_info (SSL * s, int where, int ret) { /* char buf[128];*/ return; /* FIXME: make debug level adjustable in serverlist or settings */ /* snprintf (buf, sizeof (buf), "%s (%d)", SSL_state_string_long (s), where); if (g_sess) EMIT_SIGNAL (XP_TE_SSLMESSAGE, g_sess, buf, NULL, NULL, NULL, 0); else fp...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,880
ssl_cb_verify (int ok, X509_STORE_CTX * ctx) { char subject[256]; char issuer[256]; char buf[512]; X509_NAME_oneline (X509_get_subject_name (ctx->current_cert), subject, sizeof (subject)); X509_NAME_oneline (X509_get_issuer_name (ctx->current_cert), issuer, sizeof (issuer)); snprintf (buf, size...
null
0
ssl_cb_verify (int ok, X509_STORE_CTX * ctx) { char subject[256]; char issuer[256]; char buf[512]; X509_NAME_oneline (X509_get_subject_name (ctx->current_cert), subject, sizeof (subject)); X509_NAME_oneline (X509_get_issuer_name (ctx->current_cert), issuer, sizeof (issuer)); snprintf (buf, size...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,881
tcp_send_len (server *serv, char *buf, int len) { char *dbuf; int noqueue = !serv->outbound_queue; if (!prefs.hex_net_throttle) return server_send_real (serv, buf, len); dbuf = malloc (len + 2); /* first byte is the priority */ dbuf[0] = 2; /* pri 2 for most things */ memcpy (dbuf + 1, buf, len); dbuf[len + ...
null
0
tcp_send_len (server *serv, char *buf, int len) { char *dbuf; int noqueue = !serv->outbound_queue; if (!prefs.hex_net_throttle) return server_send_real (serv, buf, len); dbuf = malloc (len + 2); /* first byte is the priority */ dbuf[0] = 2; /* pri 2 for most things */ memcpy (dbuf + 1, buf, len); dbuf[len + ...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,882
tcp_send_queue (server *serv) { char *buf, *p; int len, i, pri; GSList *list; time_t now = time (0); /* did the server close since the timeout was added? */ if (!is_server (serv)) return 0; /* try priority 2,1,0 */ pri = 2; while (pri >= 0) { list = serv->outbound_queue; while (list) { buf = (cha...
null
0
tcp_send_queue (server *serv) { char *buf, *p; int len, i, pri; GSList *list; time_t now = time (0); /* did the server close since the timeout was added? */ if (!is_server (serv)) return 0; /* try priority 2,1,0 */ pri = 2; while (pri >= 0) { list = serv->outbound_queue; while (list) { buf = (cha...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,883
three_to_four (char *from, char *to) { static const char tab64[64]= { 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P', 'Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f', 'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v', 'w','x','y','z','0','1','2','3','4','5','6','...
null
0
three_to_four (char *from, char *to) { static const char tab64[64]= { 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P', 'Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f', 'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v', 'w','x','y','z','0','1','2','3','4','5','6','...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,884
timeout_auto_reconnect (server *serv) { if (is_server (serv)) /* make sure it hasnt been closed during the delay */ { serv->recondelay_tag = 0; if (!serv->connected && !serv->connecting && serv->server_session) { server_connect (serv, serv->hostname, serv->port, FALSE); } } return 0; /* returning 0 ...
null
0
timeout_auto_reconnect (server *serv) { if (is_server (serv)) /* make sure it hasnt been closed during the delay */ { serv->recondelay_tag = 0; if (!serv->connected && !serv->connecting && serv->server_session) { server_connect (serv, serv->hostname, serv->port, FALSE); } } return 0; /* returning 0 ...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,885
traverse_http (int print_fd, int sok, char *serverAddr, int port) { char buf[512]; char auth_data[256]; char auth_data2[252]; int n, n2; n = snprintf (buf, sizeof (buf), "CONNECT %s:%d HTTP/1.0\r\n", serverAddr, port); if (prefs.hex_net_proxy_auth) { n2 = snprintf (auth_data2, sizeof (auth_data2), "%s:...
null
0
traverse_http (int print_fd, int sok, char *serverAddr, int port) { char buf[512]; char auth_data[256]; char auth_data2[252]; int n, n2; n = snprintf (buf, sizeof (buf), "CONNECT %s:%d HTTP/1.0\r\n", serverAddr, port); if (prefs.hex_net_proxy_auth) { n2 = snprintf (auth_data2, sizeof (auth_data2), "%s:...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,886
traverse_proxy (int proxy_type, int print_fd, int sok, char *ip, int port, struct msproxy_state_t *state, netstore *ns_proxy, int csok4, int csok6, int *csok, char bound) { switch (proxy_type) { case 1: return traverse_wingate (print_fd, sok, ip, port); case 2: return traverse_socks (print_fd, sok, ip, port); ...
null
0
traverse_proxy (int proxy_type, int print_fd, int sok, char *ip, int port, struct msproxy_state_t *state, netstore *ns_proxy, int csok4, int csok6, int *csok, char bound) { switch (proxy_type) { case 1: return traverse_wingate (print_fd, sok, ip, port); case 2: return traverse_socks (print_fd, sok, ip, port); ...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,887
traverse_socks (int print_fd, int sok, char *serverAddr, int port) { struct sock_connect sc; unsigned char buf[256]; sc.version = 4; sc.type = 1; sc.port = htons (port); sc.address = inet_addr (serverAddr); strncpy (sc.username, prefs.hex_irc_user_name, 9); send (sok, (char *) &sc, 8 + strlen (sc.username) + ...
null
0
traverse_socks (int print_fd, int sok, char *serverAddr, int port) { struct sock_connect sc; unsigned char buf[256]; sc.version = 4; sc.type = 1; sc.port = htons (port); sc.address = inet_addr (serverAddr); strncpy (sc.username, prefs.hex_irc_user_name, 9); send (sok, (char *) &sc, 8 + strlen (sc.username) + ...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,888
traverse_socks5 (int print_fd, int sok, char *serverAddr, int port) { struct sock5_connect1 sc1; unsigned char *sc2; unsigned int packetlen, addrlen; unsigned char buf[260]; int auth = prefs.hex_net_proxy_auth && prefs.hex_net_proxy_user[0] && prefs.hex_net_proxy_pass[0]; sc1.version = 5; sc1.nmethods = 1; if ...
null
0
traverse_socks5 (int print_fd, int sok, char *serverAddr, int port) { struct sock5_connect1 sc1; unsigned char *sc2; unsigned int packetlen, addrlen; unsigned char buf[260]; int auth = prefs.hex_net_proxy_auth && prefs.hex_net_proxy_user[0] && prefs.hex_net_proxy_pass[0]; sc1.version = 5; sc1.nmethods = 1; if ...
@@ -723,9 +723,22 @@ ssl_do_connect (server * serv) switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Faile...
CWE-310
null
null
46,889
ASN1_TIME_snprintf (char *buf, int buf_len, ASN1_TIME * tm) { char *expires = NULL; BIO *inMem = BIO_new (BIO_s_mem ()); ASN1_TIME_print (inMem, tm); BIO_get_mem_data (inMem, &expires); buf[0] = 0; if (expires != NULL) { /* expires is not \0 terminated */ safe_strcpy (buf, expires, MIN(24, buf_len)); } BI...
null
0
ASN1_TIME_snprintf (char *buf, int buf_len, ASN1_TIME * tm) { char *expires = NULL; BIO *inMem = BIO_new (BIO_s_mem ()); ASN1_TIME_print (inMem, tm); BIO_get_mem_data (inMem, &expires); buf[0] = 0; if (expires != NULL) { /* expires is not \0 terminated */ safe_strcpy (buf, expires, MIN(24, buf_len)); } BI...
@@ -25,6 +25,7 @@ #include "inet.h" /* make it first to avoid macro redefinitions */ #include <openssl/ssl.h> /* SSL_() */ #include <openssl/err.h> /* ERR_() */ +#include <openssl/x509v3.h> #ifdef WIN32 #include <openssl/rand.h> /* RAND_seed() */ #endif @@ -35,6 +36,7 @@ #include <glib.h> #inclu...
CWE-310
null
null
46,890
_SSL_context_init (void (*info_cb_func), int server) { SSL_CTX *ctx; #ifdef WIN32 int i, r; #endif SSLeay_add_ssl_algorithms (); SSL_load_error_strings (); ctx = SSL_CTX_new (server ? SSLv23_server_method() : SSLv23_client_method ()); SSL_CTX_set_session_cache_mode (ctx, SSL_SESS_CACHE_BOTH); SSL_CTX_set_timeo...
null
0
_SSL_context_init (void (*info_cb_func), int server) { SSL_CTX *ctx; #ifdef WIN32 int i, r; #endif SSLeay_add_ssl_algorithms (); SSL_load_error_strings (); ctx = SSL_CTX_new (server ? SSLv23_server_method() : SSLv23_client_method ()); SSL_CTX_set_session_cache_mode (ctx, SSL_SESS_CACHE_BOTH); SSL_CTX_set_timeo...
@@ -25,6 +25,7 @@ #include "inet.h" /* make it first to avoid macro redefinitions */ #include <openssl/ssl.h> /* SSL_() */ #include <openssl/err.h> /* ERR_() */ +#include <openssl/x509v3.h> #ifdef WIN32 #include <openssl/rand.h> /* RAND_seed() */ #endif @@ -35,6 +36,7 @@ #include <glib.h> #inclu...
CWE-310
null
null
46,891
_SSL_get_cert_info (struct cert_info *cert_info, SSL * ssl) { X509 *peer_cert; EVP_PKEY *peer_pkey; /* EVP_PKEY *ca_pkey; */ /* EVP_PKEY *tmp_pkey; */ char notBefore[64]; char notAfter[64]; int alg; int sign_alg; if (!(peer_cert = SSL_get_peer_certificate (ssl))) return (1); /* FATAL? */ X509_NAME_o...
null
0
_SSL_get_cert_info (struct cert_info *cert_info, SSL * ssl) { X509 *peer_cert; EVP_PKEY *peer_pkey; /* EVP_PKEY *ca_pkey; */ /* EVP_PKEY *tmp_pkey; */ char notBefore[64]; char notAfter[64]; int alg; int sign_alg; if (!(peer_cert = SSL_get_peer_certificate (ssl))) return (1); /* FATAL? */ X509_NAME_o...
@@ -25,6 +25,7 @@ #include "inet.h" /* make it first to avoid macro redefinitions */ #include <openssl/ssl.h> /* SSL_() */ #include <openssl/err.h> /* ERR_() */ +#include <openssl/x509v3.h> #ifdef WIN32 #include <openssl/rand.h> /* RAND_seed() */ #endif @@ -35,6 +36,7 @@ #include <glib.h> #inclu...
CWE-310
null
null
46,892
_SSL_recv (SSL * ssl, char *buf, int len) { int num; num = SSL_read (ssl, buf, len); switch (SSL_get_error (ssl, num)) { case SSL_ERROR_SSL: /* ??? */ __SSL_fill_err_buf ("SSL_read"); fprintf (stderr, "%s\n", err_buf); break; case SSL_ERROR_SYSCALL: /* ??? */ if (!would_block ()) perror ("SSL_re...
null
0
_SSL_recv (SSL * ssl, char *buf, int len) { int num; num = SSL_read (ssl, buf, len); switch (SSL_get_error (ssl, num)) { case SSL_ERROR_SSL: /* ??? */ __SSL_fill_err_buf ("SSL_read"); fprintf (stderr, "%s\n", err_buf); break; case SSL_ERROR_SYSCALL: /* ??? */ if (!would_block ()) perror ("SSL_re...
@@ -25,6 +25,7 @@ #include "inet.h" /* make it first to avoid macro redefinitions */ #include <openssl/ssl.h> /* SSL_() */ #include <openssl/err.h> /* ERR_() */ +#include <openssl/x509v3.h> #ifdef WIN32 #include <openssl/rand.h> /* RAND_seed() */ #endif @@ -35,6 +36,7 @@ #include <glib.h> #inclu...
CWE-310
null
null
46,893
_SSL_socket (SSL_CTX *ctx, int sd) { SSL *ssl; if (!(ssl = SSL_new (ctx))) /* FATAL */ __SSL_critical_error ("SSL_new"); SSL_set_fd (ssl, sd); if (ctx->method == SSLv23_client_method()) SSL_set_connect_state (ssl); else SSL_set_accept_state(ssl); return (ssl); }
null
0
_SSL_socket (SSL_CTX *ctx, int sd) { SSL *ssl; if (!(ssl = SSL_new (ctx))) /* FATAL */ __SSL_critical_error ("SSL_new"); SSL_set_fd (ssl, sd); if (ctx->method == SSLv23_client_method()) SSL_set_connect_state (ssl); else SSL_set_accept_state(ssl); return (ssl); }
@@ -25,6 +25,7 @@ #include "inet.h" /* make it first to avoid macro redefinitions */ #include <openssl/ssl.h> /* SSL_() */ #include <openssl/err.h> /* ERR_() */ +#include <openssl/x509v3.h> #ifdef WIN32 #include <openssl/rand.h> /* RAND_seed() */ #endif @@ -35,6 +36,7 @@ #include <glib.h> #inclu...
CWE-310
null
null
46,894
__SSL_critical_error (char *funcname) { __SSL_fill_err_buf (funcname); fprintf (stderr, "%s\n", err_buf); exit (1); }
null
0
__SSL_critical_error (char *funcname) { __SSL_fill_err_buf (funcname); fprintf (stderr, "%s\n", err_buf); exit (1); }
@@ -25,6 +25,7 @@ #include "inet.h" /* make it first to avoid macro redefinitions */ #include <openssl/ssl.h> /* SSL_() */ #include <openssl/err.h> /* ERR_() */ +#include <openssl/x509v3.h> #ifdef WIN32 #include <openssl/rand.h> /* RAND_seed() */ #endif @@ -35,6 +36,7 @@ #include <glib.h> #inclu...
CWE-310
null
null
46,895
__SSL_fill_err_buf (char *funcname) { int err; char buf[256]; err = ERR_get_error (); ERR_error_string (err, buf); g_snprintf (err_buf, sizeof (err_buf), "%s: %s (%d)\n", funcname, buf, err); }
null
0
__SSL_fill_err_buf (char *funcname) { int err; char buf[256]; err = ERR_get_error (); ERR_error_string (err, buf); g_snprintf (err_buf, sizeof (err_buf), "%s: %s (%d)\n", funcname, buf, err); }
@@ -25,6 +25,7 @@ #include "inet.h" /* make it first to avoid macro redefinitions */ #include <openssl/ssl.h> /* SSL_() */ #include <openssl/err.h> /* ERR_() */ +#include <openssl/x509v3.h> #ifdef WIN32 #include <openssl/rand.h> /* RAND_seed() */ #endif @@ -35,6 +36,7 @@ #include <glib.h> #inclu...
CWE-310
null
null
46,896
broke_oneline (char *oneline, char *parray[]) { char *pt, *ppt; int i; i = 0; ppt = pt = oneline + 1; while ((pt = strchr (pt, '/'))) { *pt = 0; parray[i++] = ppt; ppt = ++pt; } parray[i++] = ppt; parray[i] = NULL; }
null
0
broke_oneline (char *oneline, char *parray[]) { char *pt, *ppt; int i; i = 0; ppt = pt = oneline + 1; while ((pt = strchr (pt, '/'))) { *pt = 0; parray[i++] = ppt; ppt = ++pt; } parray[i++] = ppt; parray[i] = NULL; }
@@ -25,6 +25,7 @@ #include "inet.h" /* make it first to avoid macro redefinitions */ #include <openssl/ssl.h> /* SSL_() */ #include <openssl/err.h> /* ERR_() */ +#include <openssl/x509v3.h> #ifdef WIN32 #include <openssl/rand.h> /* RAND_seed() */ #endif @@ -35,6 +36,7 @@ #include <glib.h> #inclu...
CWE-310
null
null
46,897
changes_compar(const struct dirent **d1, const struct dirent **d2) { struct stat st1, st2; stat((*d1)->d_name, &st1); stat((*d2)->d_name, &st2); if (st1.st_mtime > st2.st_mtime) return 1; else return -1; }
Dir. Trav.
0
changes_compar(const struct dirent **d1, const struct dirent **d2) { struct stat st1, st2; stat((*d1)->d_name, &st1); stat((*d2)->d_name, &st2); if (st1.st_mtime > st2.st_mtime) return 1; else return -1; }
@@ -851,6 +851,26 @@ wiki_show_footer(HttpResponse *res) ); } +int page_name_is_good(char* page_name) +{ +/* We should give access only to subdirs of didiwiki root. + I guess that check for absense of '/' is enough. + + TODO: Use realpath() +*/ + if (!page_name) + return FALSE; + + if (!is...
CWE-22
null
null
46,898
file_read(char *filename) { struct stat st; FILE* fp; char* str; int len; /* Get the file size. */ if (stat(filename, &st)) return NULL; if (!(fp = fopen(filename, "rb"))) return NULL; str = (char *)malloc(sizeof(char)*(st.st_size + 1)); len = fread(str, 1, st.st_siz...
Dir. Trav.
0
file_read(char *filename) { struct stat st; FILE* fp; char* str; int len; /* Get the file size. */ if (stat(filename, &st)) return NULL; if (!(fp = fopen(filename, "rb"))) return NULL; str = (char *)malloc(sizeof(char)*(st.st_size + 1)); len = fread(str, 1, st.st_siz...
@@ -851,6 +851,26 @@ wiki_show_footer(HttpResponse *res) ); } +int page_name_is_good(char* page_name) +{ +/* We should give access only to subdirs of didiwiki root. + I guess that check for absense of '/' is enough. + + TODO: Use realpath() +*/ + if (!page_name) + return FALSE; + + if (!is...
CWE-22
null
null
46,899
file_write(char *filename, char *data) { FILE* fp; int bytes_written = 0; int len = strlen(data); /* clip off extra '\0' */ if (!(fp = fopen(filename, "wb"))) return -1; while ( len > 0 ) { bytes_written = fwrite(data, sizeof(char), len, fp); len = len -...
Dir. Trav.
0
file_write(char *filename, char *data) { FILE* fp; int bytes_written = 0; int len = strlen(data); /* clip off extra '\0' */ if (!(fp = fopen(filename, "wb"))) return -1; while ( len > 0 ) { bytes_written = fwrite(data, sizeof(char), len, fp); len = len -...
@@ -851,6 +851,26 @@ wiki_show_footer(HttpResponse *res) ); } +int page_name_is_good(char* page_name) +{ +/* We should give access only to subdirs of didiwiki root. + I guess that check for absense of '/' is enough. + + TODO: Use realpath() +*/ + if (!page_name) + return FALSE; + + if (!is...
CWE-22
null
null