NetBSD-Bugs archive

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

kern/54326: src/sys/compat/sunos/sunos_misc.c: 1051: use of dangling pointer ?



>Number:         54326
>Category:       kern
>Synopsis:       src/sys/compat/sunos/sunos_misc.c: 1051: use of dangling pointer ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 24 14:20:01 +0000 2019
>Originator:     David Binderman
>Release:        cvs 20190624
>Organization:
>Environment:
>Description:
src/sys/compat/sunos/sunos_misc.c:1046] -> [src/sys/compat/sunos/sunos_misc.c:1039] -> [src/sys/compat/sunos/sunos_misc.c:1051]: (error) Using pointer to local variable 'bs' that is out of scope.

Source code is


        if (sun_howto & SUNOS_RB_STRING) {
                char bs[128];

                error = copyinstr(SCARG(uap, bootstr), bs, sizeof(bs), 0);

                if (error)
                        bootstr = NULL;
                else
                        bootstr = bs;
        } else
                bootstr = NULL;

        SCARG(&ua, opt) = bsd_howto;
        SCARG(&ua, bootstr) = bootstr;

>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index