diff options
| author | Donald Sharp <donaldsharp72@gmail.com> | 2023-09-27 15:25:38 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-27 15:25:38 -0400 |
| commit | 60c38a99ac8fc447b02370e5b393d76128c2909e (patch) | |
| tree | d036752be7346bd06deabe0a52b2d48ce1745d26 /bgpd/bgp_debug.c | |
| parent | bb308b1efc2e902c96ffe047bc6394a8da3a16d3 (diff) | |
| parent | b8f3f0b86ff3fae4a3e655811680bc11b18fd0e2 (diff) | |
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 0ff8bdcbbe..35f83062de 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); } |
