]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: http: the "unique-id" sample fetch could crash without a steeam
authorWilly Tarreau <w@1wt.eu>
Wed, 29 Apr 2020 09:50:38 +0000 (11:50 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 29 Apr 2020 09:55:36 +0000 (11:55 +0200)
commita1062a4de8ba300979cc380b69b284f86dc13853
tree58a3281b4e8f92410aeba7efbdd7ad0f4b484189
parent79512b6d8f2f049a86b2332d4f4dc972cc33d631
BUG/MEDIUM: http: the "unique-id" sample fetch could crash without a steeam

Since commit 5f940703b3 ("MINOR: log: Don't depends on a stream to process
samples in log-format string") it has become quite obvious that a few sample
fetch functions and converters were still heavily dependent on the presence
of a stream without testing for it.

The unique-id sample fetch function, if called without a stream, will result
in a crash.

This fix adds a check for the stream's existence, and should be backported
to all stable versions up to 1.7.
src/http_fetch.c