Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Aug 2023 23:45:45 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 273220] "scriptedpart DEFAULT" will segfault with unformatted disks
Message-ID:  <bug-273220-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273220

            Bug ID: 273220
           Summary: "scriptedpart DEFAULT" will segfault with unformatted
                    disks
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: lars@oddbit.com

Called as `bsdinstall scriptedpart DEFAULT`, partedit will arrive at line
204...

    return (part_config(disk, scheme, partconfig));

...with `disk`, `scheme`, and `partconfig` all set to `NULL`. These are pas=
sed
to `part_config()`, which on line 79 calls:

    if (provider_for_name(&mesh, disk) =3D=3D NULL) {

With `disk` =3D=3D `NULL`. In `provider_for_name()`, on line 52, we have:

    if (strcmp(pp->lg_name, name) =3D=3D 0)

Here, `name` is `NULL` (it receives the value of `disk` from `part_config()=
`,
and this triggers a segfault.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-273220-227>