diff options
author | Benoît Ganne <bganne@cisco.com> | 2019-07-10 14:56:26 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-07-24 12:07:01 +0000 |
commit | 5a61f64f6e7c812f9bfb5d4219e1a22798368582 (patch) | |
tree | b34e2a651090821ed35c52e1cada5bab7a569d00 /src/plugins/l2e | |
parent | 8c1280fd9ade67ecfca35c545fbdcb49d5d4325e (diff) |
memif: fix vector overflow when copying strings
When memif sends back socket messages containing strings, we copy
vectors into C-string. Unfortunately, most vectors are not
null-terminated, causing strncpy() read overflow. Moreover, strncpy()
does not null-terminate string in case of max length reached.
This patch introduces helpers to safely copy strings from vectors.
Type: fix
Fixes: d6042d4f1ea0baf02bc87c72960a331a9e08dfab
Change-Id: I38489ec8d2a5d4a42b9abde1aa3dfdbd06ebe024
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/plugins/l2e')
0 files changed, 0 insertions, 0 deletions