The following issues were found
arch/powerpc/include/asm/xics.h
1 issues
Line: 106
Column: 11
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
extern struct irq_domain *xics_host;
struct xics_cppr {
unsigned char stack[MAX_NUM_PRIORITIES];
int index;
};
DECLARE_PER_CPU(struct xics_cppr, xics_cppr);
Reported by FlawFinder.
arch/powerpc/mm/numa.c
1 issues
Line: 1022
Column: 17
CWE codes:
126
p = strstr(p, "fake=");
if (p)
cmdline = p + strlen("fake=");
return 0;
}
early_param("numa", early_numa);
Reported by FlawFinder.
arch/arm/mach-orion5x/dns323-setup.c
1 issues
Line: 241
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
iounmap(mac_page);
printk("DNS-323: Found ethernet MAC address: %pM\n", addr);
memcpy(dns323_eth_data.mac_addr, addr, 6);
return 0;
error_fail:
iounmap(mac_page);
Reported by FlawFinder.
arch/powerpc/include/asm/vga.h
1 issues
Line: 45
Column: 21
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
#define VT_BUF_HAVE_MEMCPYW
#define VT_BUF_HAVE_MEMMOVEW
#define scr_memcpyw memcpy
#define scr_memmovew memmove
#endif /* !CONFIG_VGA_CONSOLE && !CONFIG_MDA_CONSOLE */
#ifdef __powerpc64__
Reported by FlawFinder.
arch/powerpc/perf/core-book3s.c
1 issues
Line: 2109
Column: 9
CWE codes:
120
Suggestion:
Use sprintf_s, snprintf, or vsnprintf
pmu_attr = container_of(attr, struct perf_pmu_events_attr, attr);
return sprintf(page, "event=0x%02llx\n", pmu_attr->id);
}
static struct pmu power_pmu = {
.pmu_enable = power_pmu_enable,
.pmu_disable = power_pmu_disable,
Reported by FlawFinder.
arch/powerpc/include/asm/user.h
1 issues
Line: 44
Column: 2
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
long int signal; /* signal causing core dump */
unsigned long u_ar0; /* help gdb find registers */
unsigned long magic; /* identifies a core file */
char u_comm[32]; /* user command name */
};
#define NBPG PAGE_SIZE
#define UPAGES 1
#define HOST_TEXT_START_ADDR (u.start_code)
Reported by FlawFinder.
arch/alpha/kernel/srmcons.c
1 issues
Line: 94
Column: 9
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
static int
srmcons_do_write(struct tty_port *port, const char *buf, int count)
{
static char str_cr[1] = "\r";
long c, remaining = count;
srmcons_result result;
char *cur;
int need_cr;
Reported by FlawFinder.
arch/arm/mach-omap2/voltage.h
1 issues
Line: 74
Column: 8
CWE codes:
120
20
struct omap_vc_param *vc_param;
/* VC/VP register access functions: SoC specific */
u32 (*read) (u8 offset);
void (*write) (u32 val, u8 offset);
u32 (*rmw)(u32 mask, u32 bits, u8 offset);
union {
const char *name;
Reported by FlawFinder.
arch/powerpc/perf/imc-pmu.c
1 issues
Line: 1018
Column: 47
CWE codes:
126
static bool is_thread_imc_pmu(struct perf_event *event)
{
if (!strncmp(event->pmu->name, "thread_imc", strlen("thread_imc")))
return true;
return false;
}
Reported by FlawFinder.
arch/powerpc/include/asm/udbg.h
1 issues
Line: 23
Column: 26
CWE codes:
134
Suggestion:
Use a constant for the format specification
extern void register_early_udbg_console(void);
extern void udbg_printf(const char *fmt, ...)
__attribute__ ((format (printf, 1, 2)));
extern void udbg_progress(char *s, unsigned short hex);
extern void udbg_uart_init_mmio(void __iomem *addr, unsigned int stride);
extern void udbg_uart_init_pio(unsigned long port, unsigned int stride);
Reported by FlawFinder.