diff options
author | Donald Sharp <donaldsharp72@gmail.com> | 2023-09-27 21:25:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-27 21:25:38 +0200 |
commit | 60c38a99ac8fc447b02370e5b393d76128c2909e (patch) | |
tree | d036752be7346bd06deabe0a52b2d48ce1745d26 /bgpd/bgp_debug.c | |
parent | Merge pull request #14482 from opensourcerouting/fix/walltime_threshold_disable (diff) | |
parent | bgpd: initialization in bgp_notify_admin_message function (diff) | |
download | frr-60c38a99ac8fc447b02370e5b393d76128c2909e.tar.xz frr-60c38a99ac8fc447b02370e5b393d76128c2909e.zip |
Merge pull request #14342 from fdumontet6WIND/fix_crash_snmp
bgpd: fix crash in *bgpv2PeerErrorsTable"
Diffstat (limited to 'bgpd/bgp_debug.c')
-rw-r--r-- | bgpd/bgp_debug.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c index 0ff8bdcbb..35f83062d 100644 --- a/bgpd/bgp_debug.c +++ b/bgpd/bgp_debug.c @@ -500,12 +500,13 @@ const char *bgp_notify_subcode_str(char code, char subcode) const char *bgp_notify_admin_message(char *buf, size_t bufsz, uint8_t *data, size_t datalen) { + memset(buf, 0, bufsz); if (!data || datalen < 1) - return NULL; + return buf; uint8_t len = data[0]; if (!len || len > datalen - 1) - return NULL; + return buf; return zlog_sanitize(buf, bufsz, data + 1, len); } |