]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: maps: only try to parse the default value when it's present
authorWilly Tarreau <w@1wt.eu>
Fri, 19 Apr 2019 09:35:22 +0000 (11:35 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 19 Apr 2019 09:35:22 +0000 (11:35 +0200)
commitaa5801bcaade82ce58b9a70f320b7d0389e444b0
tree015ba0f613429a104c9c42c66a1c16291a327b60
parent88698d966da5c88d5806b517b65b0c4e1b6b8c14
BUG/MEDIUM: maps: only try to parse the default value when it's present

Maps returning an IP address (e.g. map_str_ip) support an optional
default value which must be parsed. Unfortunately the parsing code does
not check for this argument's existence and uncondtionally tries to
resolve the argument whenever the output is of type address, resulting
in segfaults at parsing time when no such argument is provided. This
patch adds the appropriate check.

This fix may be backported as far as 1.6.
src/map.c