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/>

index | next in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273220

            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 passed
to `part_config()`, which on line 79 calls:

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

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

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

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

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

home | help

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