diff --git a/binr/radiff2/radiff2.c b/binr/radiff2/radiff2.c index 6092046aad..7526cafc75 100644 --- a/binr/radiff2/radiff2.c +++ b/binr/radiff2/radiff2.c @@ -146,7 +146,7 @@ static int cb(RDiff *d, void *user, RDiffOp *op) { } static int show_help(int v) { - printf ("Usage: radiff2 [-abcCdjrspOv] [-g sym] [-t %%] [file] [file]\n"); + printf ("Usage: radiff2 [-abcCdjrspOxv] [-g sym] [-t %%] [file] [file]\n"); if (v) printf ( " -a [arch] specify architecture plugin to use (x86, arm, ..)\n" " -A [-A] run aaa or aaaa after loading each binary\n" @@ -163,6 +163,7 @@ static int show_help(int v) { " -r output in radare commands\n" " -s compute text distance\n" " -t [0-100] set threshold for code diff (default is 70%%)\n" + " -x show two column hexdump diffing\n" " -v show version information\n"); return 1; } @@ -186,7 +187,7 @@ static void dump_cols (ut8 *a, int as, ut8 *b, int bs, int w) { return ; } for (i = 0; i < sz; i += w) { - bool eq = memcmp (a + i, b + i, 8) == NULL; + bool eq = memcmp (a + i, b + i, w) == NULL; if (eq) { ctx--; if (ctx == -1) { diff --git a/man/radiff2.1 b/man/radiff2.1 index 5ec9f7b0bf..edc59b046a 100644 --- a/man/radiff2.1 +++ b/man/radiff2.1 @@ -1,11 +1,11 @@ -.Dd May 11, 2014 +.Dd Apr 21, 2016 .Dt RADIFF2 1 .Sh NAME .Nm RADIFF2 .Nd unified binary diffing utility .Sh SYNOPSIS .Nm radiff2 -.Op Fl AabcCDOdrspvh +.Op Fl AabcCdDhOrspxv .Op Fl t Ar 0-100 .Op Fl g Ar sym .Ar file1 @@ -40,6 +40,8 @@ Do code diffing with all bytes instead of just the fixed opcode bytes Use physical addressing (io.va=0) .It Fl r Output in radare commands as a binary patch. +.It Fl x +Show two column hexdump diffing. .It Fl s Calculate text distance from two files. .It Fl t Ar 0\-100