diff options
author | Thierry Bultel <thierry.bultel@iot.bzh> | 2018-08-22 08:48:46 +0200 |
---|---|---|
committer | Thierry Bultel <thierry.bultel@iot.bzh> | 2018-08-22 11:17:45 +0200 |
commit | bdf1a6b435bf56cede2f7edf17c9d96ed5775277 (patch) | |
tree | 3ef4a606be4a807506a9394b6481e8bd5019749f /ctl-lib/ctl-plugin.h | |
parent | 4386ec54f811f19a14d0f60688321d4a1a69b78a (diff) |
ctl-lua: Fixed memory corruption
fixed a malloc random crash when loading the configuration files.
A write of one byte was done outside of an allocated area.
Namely, strncat always writes n+1 bytes, thus a best practice is to always
calculate n as this:
buffer_size-strlen(s)-1
Change-Id: Icb568f324d466fc6eef40c3e251ce6b8a7006d95
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
Diffstat (limited to 'ctl-lib/ctl-plugin.h')
0 files changed, 0 insertions, 0 deletions