0087-pmap: Fix parsing error in config_read().
$ echo '[' > crash $ pmap -C crash $$ Segmentation fault (core dumped) Signed-off-by: Craig Small <csmall@enc.com.au>
This commit is contained in:
parent
bf409f92fd
commit
45f81ef706
2
pmap.c
2
pmap.c
@ -836,7 +836,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…
Reference in New Issue
Block a user