libyang BUGFIX avoid invalid parameters for memmove and memcpy
diff --git a/src/json.c b/src/json.c
index c5c3f32..4613d49 100644
--- a/src/json.c
+++ b/src/json.c
@@ -256,7 +256,9 @@
                 buf = ly_realloc(buf, len + offset + 1);
                 LY_CHECK_ERR_RET(!buf, LOGMEM(jsonctx->ctx), LY_EMEM);
                 size = len + offset + 1;
-                memcpy(&buf[len], in, offset);
+                if (offset) {
+                    memcpy(&buf[len], in, offset);
+                }
 
                 /* set terminating NULL byte */
                 buf[len + offset] = '\0';