mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 23:56:57 +02:00
BUG/MINOR: cfgparse: parse_cfg: fix null ptr dereference reported by coverity
This commit fixes potential null ptr dereferences reported by coverity, see more details about it in the issues #2676 and #2668. 'outline' ptr, which is initialized to NULL explicitly as a temporary buffer to store split keywords may be in theory implicitly dereferenced in some corner cases (which we haven't encountered yet with real world configurations) in 'if (!**args)'. parse_line() code, called before under some conditions assigns: args[arg] = outline + outpos and outpos initial value is 0.
This commit is contained in:
parent
eb82358690
commit
16e89f6b5c
@ -2293,7 +2293,7 @@ int parse_cfg(const struct cfgfile *cfg)
|
|||||||
/* end of config dump */
|
/* end of config dump */
|
||||||
|
|
||||||
/* empty line */
|
/* empty line */
|
||||||
if (!**args)
|
if (!*args || !**args)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* check for config macros */
|
/* check for config macros */
|
||||||
|
Loading…
Reference in New Issue
Block a user