The following issues were found
arch/x86/math-emu/poly_atan.c
1 issues
Line: 93
CWE codes:
908
XSIG_LL(Numer) = significand(st1_ptr);
XSIG_LL(Denom) = significand(st0_ptr);
}
div_Xsig(&Numer, &Denom, &argSignif);
exponent += norm_Xsig(&argSignif);
if ((exponent >= -1)
|| ((exponent == -2) && (argSignif.msw > 0xd413ccd0))) {
/* The argument is greater than sqrt(2)-1 (=0.414213562...) */
Reported by Cppcheck.
arch/arm/mach-ep93xx/core.c
1 issues
Line: 885
Column: 8
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
#define EP93XX_SECURITY_UNIQID4 EP93XX_SECURITY_REG(0x2708)
#define EP93XX_SECURITY_UNIQID5 EP93XX_SECURITY_REG(0x270c)
static char ep93xx_soc_id[33];
static const char __init *ep93xx_get_soc_id(void)
{
unsigned int id, id2, id3, id4, id5;
Reported by FlawFinder.
arch/powerpc/sysdev/mpic.c
1 issues
Line: 1091
Column: 18
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
{
struct mpic *mpic = h->host_data;
static unsigned char map_mpic_senses[4] = {
IRQ_TYPE_EDGE_RISING,
IRQ_TYPE_LEVEL_LOW,
IRQ_TYPE_LEVEL_HIGH,
IRQ_TYPE_EDGE_FALLING,
};
Reported by FlawFinder.
arch/arm/mach-dove/pcie.c
1 issues
Line: 30
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
u8 root_bus_nr;
void __iomem *base;
spinlock_t conf_lock;
char mem_space_name[16];
struct resource res;
};
static struct pcie_port pcie_port[2];
static int num_pcie_ports;
Reported by FlawFinder.
block/partitions/mac.c
1 issues
Line: 113
Column: 9
CWE codes:
126
int i, l;
goodness++;
l = strlen(part->name);
if (strcmp(part->name, "/") == 0)
goodness++;
for (i = 0; i <= l - 4; ++i) {
if (strncasecmp(part->name + i, "root",
4) == 0) {
Reported by FlawFinder.
arch/powerpc/sysdev/xics/ics-native.c
1 issues
Line: 196
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
if (!ics)
return -ENOMEM;
ics->node = of_node_get(np);
memcpy(&ics->ics, &ics_native_template, sizeof(struct ics));
ics->base = of_iomap(np, 0);
if (!ics->base) {
pr_err("Failed to map %pOFP\n", np);
rc = -ENOMEM;
Reported by FlawFinder.
arch/powerpc/sysdev/xive/common.c
1 issues
Line: 69
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
/* The IPIs use the same logical irq number when on the same chip */
static struct xive_ipi_desc {
unsigned int irq;
char name[16];
atomic_t started;
} *xive_ipis;
/*
* Use early_cpu_to_node() for hot-plugged CPUs
Reported by FlawFinder.
arch/nios2/mm/pgtable.c
1 issues
Line: 61
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
if (ret) {
init = pgd_offset(&init_mm, 0UL);
pgd_init(ret);
memcpy(ret + USER_PTRS_PER_PGD, init + USER_PTRS_PER_PGD,
(PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t));
}
return ret;
}
Reported by FlawFinder.
arch/powerpc/xmon/nonstdio.h
1 issues
Line: 12
Column: 9
CWE codes:
134
Suggestion:
Use a constant for the format specification
extern char *xmon_gets(char *, int);
extern __printf(1, 2) void xmon_printf(const char *fmt, ...);
#define printf xmon_printf
#define putchar xmon_putchar
Reported by FlawFinder.
arch/powerpc/xmon/ppc-dis.c
1 issues
Line: 241
Column: 21
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
&& (((dialect & PPC_OPCODE_PPC) != 0)
|| ((dialect & PPC_OPCODE_VLE) != 0)))
{
static const char *cbnames[4] = { "lt", "gt", "eq", "so" };
int cr;
int cc;
cr = value >> 2;
if (cr != 0)
Reported by FlawFinder.