]> git.proxmox.com Git - mirror_frr.git/commit
ldpd: buffer underflow, thread safety (PVS-Studio)
authorF. Aragon <paco@voltanet.io>
Tue, 3 Jul 2018 18:07:25 +0000 (20:07 +0200)
committerF. Aragon <paco@voltanet.io>
Tue, 3 Jul 2018 22:01:22 +0000 (00:01 +0200)
commit4149ef7c0f0876a2b9fdfe34afc1ecd9036b2382
tree22341ea9b9bcd5bb71483cf5559f7906233690d5
parent7f04893904881c2822a3736d004358a0dad9f959
ldpd: buffer underflow, thread safety (PVS-Studio)

This commit fixes two issues:
- memcpy() using containers of different sizes when using addr2sa(), mixing
  'struct sockaddr_storage' and 'union sockunion'.
- addr2sa() function not being thread safe (using a local static variable as
  container.

Signed-off-by: F. Aragon <paco@voltanet.io>
ldpd/ldpd.h
ldpd/neighbor.c
ldpd/packet.c
ldpd/pfkey.c
ldpd/socket.c
ldpd/util.c