diff options
| author | Christian Hopps <chopps@labn.net> | 2024-06-12 18:48:02 -0400 |
|---|---|---|
| committer | Christian Hopps <chopps@labn.net> | 2024-06-12 18:48:19 -0400 |
| commit | 07090ccf5a3c81f650faef914a646f0e31a26fc8 (patch) | |
| tree | dab11345bc0548e6d09ff3ec64c3a578b71dbf3d /lib/yang.c | |
| parent | 8dac2215ed49fbbf8781d59c78569ced2ab44c91 (diff) | |
lib: fix incorrect use of error checking macro
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'lib/yang.c')
| -rw-r--r-- | lib/yang.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/yang.c b/lib/yang.c index 702fcf436d..44459df4a5 100644 --- a/lib/yang.c +++ b/lib/yang.c @@ -897,7 +897,7 @@ char *yang_convert_lyd_format(const char *data, size_t data_len, 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"); return NULL; } |
