Skip to content

Commit 56e7175

Browse files
committed
data parsers BUGFIX checking binary's base64 format
Invalid logic for updating the modified (removed leading/trailing whitespaces) value.
1 parent b1ed7e5 commit 56e7175

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/parser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1471,7 +1471,7 @@ lyp_parse_value(struct lys_type *type, const char **value_, struct lyxml_elem *x
14711471
goto cleanup;
14721472
}
14731473

1474-
if (ptr != value || ptr[u] != '\0') {
1474+
if (value && (ptr != value || ptr[u] != '\0')) {
14751475
/* update the changed value */
14761476
ptr = lydict_insert(type->parent->module->ctx, ptr, u);
14771477
lydict_remove(type->parent->module->ctx, *value_);

0 commit comments

Comments
 (0)