NetBSD-Bugs archive

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

port-amd64/52964: src/sys/arch/amd64/amd64/db_interface.c:241: suspicous coding ?



>Number:         52964
>Category:       port-amd64
>Synopsis:       src/sys/arch/amd64/amd64/db_interface.c:241: suspicous coding ?
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-amd64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 30 16:55:00 +0000 2018
>Originator:     David Binderman
>Release:        cvs-20180130
>Organization:
>Environment:
>Description:
src/sys/arch/amd64/amd64/db_interface.c:241]: (warning) Address of local variable dbreg is assigned to global pointer ddb_regp and not reassigned before dbreg goes out of scope.

Source code is

    ddb_regp = &dbreg;

Surely dangerous to export the address of a local variable outside the
scope of the function ?



>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index