From 5f1ef5f5903a4a43a0fd20283dd4b79296632822 Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Fri, 3 Jan 2020 19:50:27 +0200 Subject: [PATCH] fix `shadow variable` thanks @iceman1001 ) --- client/emv/dol.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/emv/dol.c b/client/emv/dol.c index c7f8fd563..973349e56 100644 --- a/client/emv/dol.c +++ b/client/emv/dol.c @@ -32,14 +32,14 @@ static size_t dol_calculate_len(const struct tlv *tlv, size_t data_len) { size_t count = 0; while (left) { - struct tlv tlv; - if (!tlv_parse_tl(&buf, &left, &tlv)) + struct tlv cur_tlv; + if (!tlv_parse_tl(&buf, &left, &cur_tlv)) return 0; - count += tlv.len; + count += cur_tlv.len; /* Last tag can be of variable length */ - if (tlv.len == 0 && left == 0) + if (cur_tlv.len == 0 && left == 0) count = data_len; }