1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00
Peter Rajnoha 6c81cd26cc config: fix config node lookup inside empty sections to not return the section itself
When a section was empty in a configuration tree (no children - this is
allowed) and we were looking for a config node inside that section, the
_find_config_node function incorrectly returned the section itself if
the node inside that section was not found.

For example the configuration below:

The config:
    abc {
    }

And a function call to get the "def" node inside "abc" section:
     _find_config_node(..., "abc/def")

...returned the "abc" node instead of NULL ("def" not found).

This in turn caused segfaults in the code using lookups in such
a configuration tree as we (correctly) expected that the node
returned was always the one we were looking for or NULL if not
found. But if incorrect node was returned instead, we processed
that as if this was the node we were looking for and so we
processed its value as well. But sections don't have values => segfault.
2013-02-27 13:47:57 +01:00
..
2013-01-07 22:25:19 +00:00
2013-02-05 14:27:25 +01:00
2013-02-05 14:27:24 +01:00
2012-02-08 12:59:45 +00:00
2012-07-31 11:12:34 +02:00