Merge pull request #2832 from wschaeferB/2667-RegRipperMenuOrder

2667 added returns when substr is not defined to menuorder RegRipper …
This commit is contained in:
Richard Cordovano 2017-06-08 10:18:46 -04:00 committed by GitHub
commit 28c9bdd978

View File

@ -167,6 +167,7 @@ sub parseAugM {
my $str = ""; my $str = "";
while($tag) { while($tag) {
my $s = substr($data,0x16 + $cnt,1); my $s = substr($data,0x16 + $cnt,1);
return %item unless (defined $s);
if ($s =~ m/\x00/ && ((($cnt + 1) % 2) == 0)) { if ($s =~ m/\x00/ && ((($cnt + 1) % 2) == 0)) {
$tag = 0; $tag = 0;
} }
@ -197,6 +198,7 @@ sub parseAugM {
$str = ""; $str = "";
while ($tag) { while ($tag) {
my $s = substr($data2,$ofs + $cnt,2); my $s = substr($data2,$ofs + $cnt,2);
return %item unless (defined $s);
if (unpack("v",$s) == 0) { if (unpack("v",$s) == 0) {
$tag = 0; $tag = 0;
} }
@ -241,6 +243,7 @@ sub parseItem {
my $str = ""; my $str = "";
while($tag) { while($tag) {
my $s = substr($data,$ofs + $cnt,1); my $s = substr($data,$ofs + $cnt,1);
return %item unless (defined $s);
if ($s =~ m/\x00/ && ((($cnt + 1) % 2) == 0)) { if ($s =~ m/\x00/ && ((($cnt + 1) % 2) == 0)) {
$tag = 0; $tag = 0;
} }
@ -285,6 +288,7 @@ sub parseItem {
$str = ""; $str = "";
while ($tag) { while ($tag) {
my $s = substr($data2,$ofs + $cnt,2); my $s = substr($data2,$ofs + $cnt,2);
return %item unless (defined $s);
if (unpack("v",$s) == 0) { if (unpack("v",$s) == 0) {
$tag = 0; $tag = 0;
} }