]> git.ipfire.org Git - thirdparty/strongswan.git/commit
imv-scanner: Fix potential buffer overflow
authorTobias Brunner <tobias@strongswan.org>
Tue, 18 Aug 2020 11:18:52 +0000 (13:18 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 18 Aug 2020 12:05:04 +0000 (14:05 +0200)
commitbdd058e36c994101001b3d0fa17f91ad4d299d43
treee53eddc0236da016aeb676c24a1f5d11d46da85f
parent3f8eb2ebdfa181bc9aeab5b355e2792f47be58d7
imv-scanner: Fix potential buffer overflow

While `pos` was moved to the end, `len` was not adjusted (i.e. set to 0)
so later calls could write beyond the buffer.  However, the last port
written might have been incomplete, so instead we just reset the string.
src/libimcv/plugins/imv_scanner/imv_scanner_agent.c