mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-26 23:23:35 +00:00
lib: fix incorrect use of error checking macro
Signed-off-by: Christian Hopps <chopps@labn.net>
This commit is contained in:
parent
8dac2215ed
commit
07090ccf5a
@ -897,7 +897,7 @@ char *yang_convert_lyd_format(const char *data, size_t data_len,
|
|||||||
|
|
||||||
assert(out_format != LYD_LYB);
|
assert(out_format != LYD_LYB);
|
||||||
|
|
||||||
if (in_format != LYD_LYB && !MGMT_MSG_VALIDATE_NUL_TERM(data, data_len)) {
|
if (in_format != LYD_LYB && (!data_len || data[data_len - 1] != 0)) {
|
||||||
zlog_err("Corrupt input data, no NUL terminating byte");
|
zlog_err("Corrupt input data, no NUL terminating byte");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user