From be88084127c0ee92c621b3ce220718d8e1d15ce5 Mon Sep 17 00:00:00 2001 From: Mark McKinnon Date: Tue, 10 Nov 2020 13:51:19 -0500 Subject: [PATCH] Update shellactivities.pl Fix infinite loop in plugin --- thirdparty/rr-full/plugins/shellactivities.pl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/thirdparty/rr-full/plugins/shellactivities.pl b/thirdparty/rr-full/plugins/shellactivities.pl index 8b16917536..5df9f5615f 100644 --- a/thirdparty/rr-full/plugins/shellactivities.pl +++ b/thirdparty/rr-full/plugins/shellactivities.pl @@ -70,6 +70,7 @@ sub processShellActivities { ::rptMsg(""); while ($offset < ($sz - 10)) { + # Code to locate the appropriate identifier $tag = 1; while ($tag) { @@ -78,9 +79,15 @@ sub processShellActivities { } else { $offset++; + # Check if at end of file and exit loop if it is + last if ($offset >= $sz ); } } - + + # Check if at end of file and exit loop if it is + last if ($offset >= $sz ); + + $offset += 2; $l = unpack("C",substr($data,$offset,1)); # ::rptMsg("String Length: ".sprintf "0x%x",$l);