]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: pattern: prevent const sample from being tampered in pat_match_beg()
authorAurelien DARRAGON <adarragon@haproxy.com>
Fri, 6 Sep 2024 14:21:02 +0000 (16:21 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Mon, 9 Sep 2024 13:57:23 +0000 (15:57 +0200)
commit3449525a0204841a62a9fa41119ec8c47f21fde8
tree04ce8c2a5125dfd6dc16976f3e1a6e7e50a617d0
parentef8d8215de2ed03a08172bbccb1146e5b867ce74
BUG/MINOR: pattern: prevent const sample from being tampered in pat_match_beg()

This is a complementary patch to a68affeaa ("BUG/MINOR: pattern: a sample
marked as const could be written"). Indeed the same logic from
pat_match_str() is used there, but we lack the check to ensure that the
sample is not const before writing data to it.

It could be backported to all stable versions.
src/pattern.c