NetBSD-Bugs archive

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

port-mvme68k/50792: src/sys/arch/mvme68k/mvme68k/machdep.c:316]: (error) Division by zero.



>Number:         50792
>Category:       port-mvme68k
>Synopsis:       src/sys/arch/mvme68k/mvme68k/machdep.c:316]: (error) Division by zero.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-mvme68k-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 12 16:30:00 +0000 2016
>Originator:     David Binderman
>Release:        cvs dated 20160212
>Organization:
>Environment:
>Description:
Source code is

    /* calculate cpuspeed */
    cpuspeed = 8192 / delay_divisor;
    cpuspeed *= 100;

There is no belt'n'braces code to ensure delay_divisor != 0.

Suggest add some.
>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index