pmap: Fix parsing error in config_read().
$ echo '[' > crash $ pmap -C crash $$ Segmentation fault (core dumped)
This commit is contained in:
parent
c6e427d22e
commit
6f82fa2b04
2
pmap.c
2
pmap.c
@ -832,7 +832,7 @@ static int config_read (char *rc_filename)
|
||||
trimmed += SECTION_STR_MAPPING_LEN;
|
||||
section_id = SECTION_ID_MAPPING;
|
||||
} else {
|
||||
while (*trimmed != ']' || *trimmed == '\0') trimmed++;
|
||||
while (*trimmed != ']' && *trimmed != '\0') trimmed++;
|
||||
if (*trimmed == ']') {
|
||||
section_id = SECTION_ID_UNSUPPORTED;
|
||||
xwarnx(_("unsupported section found in the config - line %d"), line_cnt);
|
||||
|
Loading…
x
Reference in New Issue
Block a user