diff options
| author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2017-12-14 13:57:03 -0200 |
|---|---|---|
| committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2017-12-14 14:03:14 -0200 |
| commit | a90b8cb58a58f2c77b8c76d76fa88cd241b776cd (patch) | |
| tree | 22020c25b37a4665f775f4f254e36e2bf1681997 | |
| parent | cb9cef73bd72113762ce9807c6623adb31427894 (diff) | |
bgpd: use buffer size instead of hardcoded value
This is a possible buffer overflow.
We should always use the buffer size (whenever possible) to tell
functions what the size of the buffer is, instead of a hardcoded value.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
| -rw-r--r-- | bgpd/rfapi/rfapi_vty.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/rfapi/rfapi_vty.c b/bgpd/rfapi/rfapi_vty.c index fb7d8beab3..37ca5edc96 100644 --- a/bgpd/rfapi/rfapi_vty.c +++ b/bgpd/rfapi/rfapi_vty.c @@ -1529,7 +1529,7 @@ void rfapiPrintRd(struct vty *vty, struct prefix_rd *prd) { char buf[RD_ADDRSTRLEN]; - prefix_rd2str(prd, buf, BUFSIZ); + prefix_rd2str(prd, buf, sizeof(buf)); vty_out(vty, "%s", buf); } |
