Since pvck's _check_vgname_start is actually checking
up-to (NAME_LEN + 2) bytes (130),
use at least this size for (MAX_LINE_CHECK + 3).
static const char _partitions[] = "/proc/partitions";
char path[PATH_MAX];
char devname[PATH_MAX] = { 0 };
- char namebuf[NAME_LEN];
+ char namebuf[NAME_LEN + 1];
char line[1024];
unsigned major = MAJOR(devno);
unsigned minor = MINOR(devno);
static int _parse_line(struct dm_task *dmt, char *buffer, const char *file,
int line)
{
- char ttype[LINE_SIZE], *ptr, *comment;
+ char ttype[LINE_SIZE + 1], *ptr, *comment;
unsigned long long start, size;
int n;
int mda_num, uint64_t mda_offset, uint64_t mda_size, char *buf)
{
FILE *fp = NULL;
- char line[MAX_LINE_CHECK];
+ char line[MAX_LINE_CHECK + 3];
char vgname[NAME_LEN+1];
char id_str[ID_STR_SIZE];
char id_first[ID_STR_SIZE];