]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: stats: make field_str() return an empty string on NULL
authorWilly Tarreau <w@1wt.eu>
Sat, 26 Nov 2016 14:55:59 +0000 (15:55 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 26 Nov 2016 14:58:37 +0000 (15:58 +0100)
commitddc3e9e55de965432946c7d13c52756f71eb06b5
tree47af08041db3c0859122471bf9c8baf91a9d1c7f
parentb3e111b4fd99137b6b8c4d687282a497ed082111
BUG/MINOR: stats: make field_str() return an empty string on NULL

It already returns an empty string when the field is empty, but as a
preventive measure we should do the same when the string itself is a
NULL. While it is not supposed to happen, it will make the code more
resistant against failed allocations and unexpected results.

This fix should be backported to 1.7.
include/proto/stats.h