]> git.proxmox.com Git - mirror_frr.git/commit - lib/yang_wrappers.c
lib: use `prefix` for yang get prefix wrapper
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Fri, 11 Oct 2019 23:15:46 +0000 (20:15 -0300)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Sat, 12 Oct 2019 01:41:17 +0000 (22:41 -0300)
commit46fcb2df90409e401223d29c6162753bf73fca64
tree324c50ed09846248ec67f723c15a1100222c9a1d
parent38e9efd85f68c115f2250d3a6e2249967b4b35b9
lib: use `prefix` for yang get prefix wrapper

This change fixes a static analyzer warning and should also make us
safer when using this function. At the moment the code that triggered
the warning is the only one that uses this function.

Passing anything other than `struct prefix` to `str2prefix` function is
dangerous, because the structure might be smaller than expected and we
might have an buffer overflow.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
lib/yang_wrappers.c
lib/yang_wrappers.h