From 2915f1b865dc88417dc672aaa3e87cfd994e07f4 Mon Sep 17 00:00:00 2001 From: Kyle Yan <kyan@codeaurora.org> Date: Tue, 9 May 2017 15:18:58 -0700 Subject: [PATCH] lrdp_v2: Add proper check for length of dump data lookup table Previous check that the client id does not exceed the lookup table was off by one. Change-Id: I078ad0cb734d528600243c91257d26d1e24ab72b --- linux-ramdump-parser-v2/debug_image_v2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-ramdump-parser-v2/debug_image_v2.py b/linux-ramdump-parser-v2/debug_image_v2.py index 5153970..302ee62 100755 --- a/linux-ramdump-parser-v2/debug_image_v2.py +++ b/linux-ramdump-parser-v2/debug_image_v2.py @@ -476,7 +476,7 @@ class DebugImage_v2(): client_entry + dump_entry_id_offset, False) if (client_id < 0 or - client_id > len(self.dump_data_id_lookup_table)): + client_id >= len(self.dump_data_id_lookup_table)): print_out_str( '!!! Invalid dump client id found {0:x}'.format(client_id)) continue -- GitLab