]> git.proxmox.com Git - mirror_corosync.git/commit
coroparse: Be more strict in what is parsed
authorJan Friesse <jfriesse@redhat.com>
Thu, 23 Aug 2018 13:06:19 +0000 (15:06 +0200)
committerJan Friesse <jfriesse@redhat.com>
Thu, 6 Sep 2018 11:01:35 +0000 (13:01 +0200)
commit80701845ab776288bb67ffbe5b4c1b0028defdc4
treec29d921d2ed961967eaceeb1f6714d729208fdbd
parent7a4725f9da9de6cdcae2e8acd32885bcf824104e
coroparse: Be more strict in what is parsed

Corosync parser is not very clever, but it is able to detect more errors
without too much code.

1. Check if section name is not empty (just '{' character)
2. Check if there is no extra characters after opening bracket '{'
3. Check if there is no extra characters after or before closing bracket
   '}'
4. Check if line is opening section, closing section or key/value

So following examples are reported as error:

totem {
    version: 2
}}}}}}}}}}

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
exec/coroparse.c