mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 10:31:09 +00:00
lib: Coverity wants strlen to include null character
Ensure that the string has the null terminating character available as well. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
068dfd62a2
commit
c4a97dc54a
@ -715,7 +715,7 @@ size_t yang_dnode_get_binary_buf(char *buf, size_t size,
|
||||
|
||||
canon = YANG_DNODE_XPATH_GET_CANON(dnode, xpath_fmt);
|
||||
cannon_len = strlen(canon);
|
||||
decode_len = cannon_len;
|
||||
decode_len = cannon_len + 1;
|
||||
value_str = (char *)malloc(decode_len);
|
||||
base64_init_decodestate(&s);
|
||||
cnt = base64_decode_block(canon, cannon_len, value_str, &s);
|
||||
|
Loading…
Reference in New Issue
Block a user