Skip to content

Commit 5a9eb79

Browse files
committed
src/plugins_types/union.c: coverity fix - overflowed integer argument
1 parent 5665973 commit 5a9eb79

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/plugins_types/union.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,8 @@ union_find_type(const struct ly_ctx *ctx, struct lysc_type_union *type_u, struct
350350
}
351351
if (msg_len == -1) {
352352
LY_CHECK_ERR_GOTO(!errs, ret = LY_EMEM, cleanup);
353+
/* for further actions in function msg_len is just 0 */
354+
msg_len = 0;
353355
}
354356
for (u = 0; u < LY_ARRAY_COUNT(type_u->types); ++u) {
355357
if (!errs[u]) {

0 commit comments

Comments
 (0)