mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
bsdlabel: limit to 8 partitions
bsdlabel is intended to support up to 20 partitions, but the disklabel
struct has a d_partitions array with only BSD_NPARTS_MIN (8) entries.
Previously, an attempt to operate on a bsdlabel with more than eight
partitions resulted in a buffer overflow.
As a stopgap limit bsdlabel to 8 partitions until this is fixed
properly.
PR: 276517
(cherry picked from commit 3f4f82c0d7)
This commit is contained in:
parent
590e02d3c0
commit
a323dd42bc
1 changed files with 1 additions and 1 deletions
|
|
@ -63,7 +63,7 @@ static char sccsid[] = "@(#)disklabel.c 8.2 (Berkeley) 1/7/94";
|
|||
#include <sys/disk.h>
|
||||
#define DKTYPENAMES
|
||||
#define FSTYPENAMES
|
||||
#define MAXPARTITIONS 20
|
||||
#define MAXPARTITIONS 8 /* XXX should be 20, but see PR276517 */
|
||||
#include <sys/disklabel.h>
|
||||
|
||||
#include <unistd.h>
|
||||
|
|
|
|||
Loading…
Reference in a new issue