From c934db33bdc01f38cefb462e65ad5c43ac2560dc Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Wed, 30 May 2012 14:58:10 +0200 Subject: [PATCH] detect NOP jumps, and trivial endless loop --- misc/tools/progs-analyzer.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/misc/tools/progs-analyzer.pl b/misc/tools/progs-analyzer.pl index 6ba7de89..061f4485 100644 --- a/misc/tools/progs-analyzer.pl +++ b/misc/tools/progs-analyzer.pl @@ -741,6 +741,13 @@ sub find_uninitialized_locals($$) $write->($ofs+1); $write->($ofs+2); } + elsif($type eq 'ipoffset') + { + push @{$warned{$ip}{$_}}, "Endless loop" + if $ofs == 0; + push @{$warned{$ip}{$_}}, "No-operation jump" + if $ofs == 1; + } } if($c->{iscall}) { -- 2.39.2