]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MINOR] cfgparse: Check whether the path given for the stats socket actually fits...
authorAndreas Kohn <andreask@fredhopper.com>
Wed, 19 Jan 2011 19:29:32 +0000 (20:29 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 23 Jan 2011 06:26:05 +0000 (07:26 +0100)
commit16171e234bc8e0ba2f1a0ce290b460f385a2fe42
tree38ec602b7bbd84ac176ac883e52e533db3177b6f
parent7d286a0f63726141fea8c087f03d4bee474bac20
[MINOR] cfgparse: Check whether the path given for the stats socket actually fits into the sockaddr_un structure to avoid truncation.

while working further on the changes to allow for dynamic
adding/removing of backend servers we noticed a potential problem: the
path given for the 'stats socket' global option may get truncated when
copying it into the sockaddr_un.sun_path field.

Attached patch checks the length, and reports an error if truncation
would happen.

This issue was noticed by Joerg Sonnenberger <joerg@NetBSD.org>.
src/dumpstats.c