From 9b54895fad37c0a57b77bb3f0cde4ab6806b45f9 Mon Sep 17 00:00:00 2001 From: dmiller Date: Sat, 8 Sep 2018 17:06:58 +0000 Subject: [PATCH] Avoid repeatedly checking the same EXIF tag; pos should not be shadowed --- scripts/http-exif-spider.nse | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/http-exif-spider.nse b/scripts/http-exif-spider.nse index e19c5b4e4..dc8465527 100644 --- a/scripts/http-exif-spider.nse +++ b/scripts/http-exif-spider.nse @@ -351,7 +351,8 @@ local function process_gps(data, pos, endian, result) -- Loop through the entries to find the fun stuff for i=1, num_entries do - local pos, tag, format, components, value = bin.unpack(endian .. "SSII", data, pos) + local tag, format, components, value + tag, format, components, value, pos = string.unpack(endian .. "I2 I2 I4 I4", data, pos) if(tag == GPS_TAG_LATITUDE or tag == GPS_TAG_LONGITUDE) then local dummy, gps, h, m, s