NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-dreamcast/50964: src/sys/arch/dreamcast/dev/gdrom.c: signed integer overflow ?



>Number:         50964
>Category:       port-dreamcast
>Synopsis:       src/sys/arch/dreamcast/dev/gdrom.c: signed integer overflow ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-dreamcast-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 13 17:40:00 +0000 2016
>Originator:     David Binderman
>Release:        cvs dated 20160313
>Organization:
>Environment:
>Description:

src/sys/arch/dreamcast/dev/gdrom.c:192]: (error) Signed integer overflow for expression '2690609152+156'.

Source code is

    cond = GDROM_COND;

but

#define GDROM_COND  GDROM(0x9c)
#define GDROM(o)    (*(volatile uint8_t *)(0xa05f7000 + (o)))

Maybe better code

#define GDROM(o)    (*(volatile uint8_t *)(0xa05f7000ULL + (o)))

>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index