We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent efe43e3 commit 9f43f21Copy full SHA for 9f43f21
1 file changed
src/parser_lyb.c
@@ -1584,15 +1584,7 @@ lyb_parse_header(struct lylyb_ctx *lybctx)
1584
/* context hash */
1585
lyb_read((uint8_t *)&hash, sizeof hash, lybctx);
1586
1587
- if (!hash) {
1588
- /* fine for no data */
1589
- lybctx->empty_hash = 1;
1590
- } else if (lybctx->ctx && (hash != ly_ctx_get_modules_hash(lybctx->ctx))) {
1591
- /* context is not set if called by lyd_lyb_data_length() */
1592
- LOGERR(lybctx->ctx, LY_EINVAL, "Different current LYB context modules hash compared to the one stored in the "
1593
- "LYB file (0x%08x != 0x%08x).", hash, ly_ctx_get_modules_hash(lybctx->ctx));
1594
- return LY_EINVAL;
1595
- }
+ /* skip hash checking to support parsing data with less strict requirements (as in the previous versions) */
1596
1597
return LY_SUCCESS;
1598
}
0 commit comments