AU: Fix bsdiff hang

BUG=chrome-os-partner:6056
TEST=Manually create diff of obfuscated lib, apply diff and verify same
as target file, run cros_generate_update_payload to make sure it still
works

Change-Id: Ib0a68789fdf725d126467cbd86ca7ae28817b06c
Reviewed-on: http://gerrit.chromium.org/gerrit/8179
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Commit-Ready: Thieu Le <thieule@chromium.org>
Tested-by: Thieu Le <thieule@chromium.org>
diff --git a/bsdiff.c b/bsdiff.c
index 1ad3c77..5080201 100644
--- a/bsdiff.c
+++ b/bsdiff.c
@@ -77,7 +77,7 @@
 	};
 
 	x=st+(en-st)/2;
-	if(memcmp(old+I[x],new,MIN(oldsize-I[x],newsize))<0) {
+	if(memcmp(old+I[x],new,MIN(oldsize-I[x],newsize))<=0) {
 		return search(I,old,oldsize,new,newsize,x,en,pos);
 	} else {
 		return search(I,old,oldsize,new,newsize,st,x,pos);