From: Jérémie Galarneau Date: Tue, 29 Aug 2017 22:36:32 +0000 (-0400) Subject: filter.lttng-utils.debug-info fix: wrong type used as function parameter X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=445e79d6766b9c79699ba4ea92ed4d7c902908b6;p=deliverable%2Fbabeltrace.git filter.lttng-utils.debug-info fix: wrong type used as function parameter Signed-off-by: Jérémie Galarneau --- diff --git a/plugins/lttng-utils/debug-info.c b/plugins/lttng-utils/debug-info.c index 92833cae0..ffc7761c7 100644 --- a/plugins/lttng-utils/debug-info.c +++ b/plugins/lttng-utils/debug-info.c @@ -380,6 +380,7 @@ void handle_statedump_build_id_event(FILE *err, struct debug_info *debug_info, int ret; int64_t vpid; uint64_t baddr; + uint64_t build_id_len; ret = get_stream_event_context_int_field_value(err, event, "_vpid", &vpid); @@ -411,11 +412,14 @@ void handle_statedump_build_id_event(FILE *err, struct debug_info *debug_info, } ret = get_payload_build_id_field_value(err, event, "_build_id", - &bin->build_id, &bin->build_id_len); + &bin->build_id, &build_id_len); if (ret) { BT_LOGE_STR("Failed to get _build_id field value."); goto end; } + if (build_id_len > SIZE_MAX) { + bin->build_id_len = (size_t) build_id_len; + } /* * Reset the is_elf_only flag in case it had been set