From 13384221a7f52dbc90c9dd97ba5ff728bbef588a Mon Sep 17 00:00:00 2001 From: Alexey Gerenkov Date: Thu, 28 Jun 2018 11:50:20 +0300 Subject: [PATCH] host_file_io: Fixes uninitialized 'offset' and 'whence' fseek args --- components/app_trace/host_file_io.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/app_trace/host_file_io.c b/components/app_trace/host_file_io.c index a6dd35c08c..b818440145 100644 --- a/components/app_trace/host_file_io.c +++ b/components/app_trace/host_file_io.c @@ -279,6 +279,8 @@ static void esp_apptrace_fseek_args_prepare(uint8_t *buf, void *priv) esp_apptrace_fseek_args_t *args = priv; memcpy(buf, &args->file, sizeof(args->file)); + memcpy(buf + sizeof(args->file), &args->offset, sizeof(args->offset)); + memcpy(buf + sizeof(args->file) + sizeof(args->offset), &args->whence, sizeof(args->whence)); } int esp_apptrace_fseek(esp_apptrace_dest_t dest, void *stream, long offset, int whence) -- 2.40.0