author | Florian Forster <octo@collectd.org> | |
Mon, 29 Jun 2015 15:32:44 +0000 (17:32 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Mon, 29 Jun 2015 15:32:44 +0000 (17:32 +0200) | ||
commit | e1b93f596067106e7c29c263b8bb4d0b51718d9d | |
tree | dd1a53e7577a64d65508101997f02b5f59385a07 | tree | snapshot |
parent | cf8bb3fbdadcdd4ed021377a01da8fb6459b7e7e | commit | diff |
src/daemon/utils_subst.c: Sanitize buffer offsets better.
The previous implementation broke when off1 / off2 were outside of "string"
but within "buflen". It also had problems if the replacement string was
too long. This new implementation truncates the buffer as expected and
is properly tested.
The previous implementation broke when off1 / off2 were outside of "string"
but within "buflen". It also had problems if the replacement string was
too long. This new implementation truncates the buffer as expected and
is properly tested.
src/daemon/Makefile.am | diff | blob | history | |
src/daemon/utils_subst.c | diff | blob | history | |
src/target_replace.c | diff | blob | history |