Skip to content

Commit 7c18d0b

Browse files
committed
binary BUGFIX prevent uint overflow
1 parent 1c89966 commit 7c18d0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plugins_types/binary.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ lyplg_type_print_binary(const struct ly_ctx *ctx, const struct lyd_value *value,
420420
if (format == LY_VALUE_LYB) {
421421
*dynamic = 0;
422422
if (value_size_bits) {
423-
*value_size_bits = val->size * 8;
423+
*value_size_bits = (uint64_t)val->size * 8;
424424
}
425425
return val->data;
426426
}

0 commit comments

Comments
 (0)