NetBSD-Bugs archive

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

kern/51012: src/sys/arch/algor/dev/bonito_mainbus.c:89]: (error) Uninitialized variable: bc



>Number:         51012
>Category:       kern
>Synopsis:       src/sys/arch/algor/dev/bonito_mainbus.c:89]: (error) Uninitialized variable: bc
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 26 12:15:00 +0000 2016
>Originator:     David Binderman
>Release:        cvs dated 20160326
>Organization:
>Environment:
>Description:
Source code is

#if defined(ALGOR_P6032)
    bc = &p6032_configuration.ac_bonito;
#endif
    sc->sc_bonito = bc;

but

   struct bonito_config *bc;

So if ALGOR_P6032 isn't defined, then random stack contents
are being copied into a struct field.

Suggest initialise bc to something sensible.

>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index