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 <[email protected]>
Commit-Ready: Thieu Le <[email protected]>
Tested-by: Thieu Le <[email protected]>
This commit is contained in:
Thieu Le authored and Alex Deymo committed 2015-09-23 10:01:35 -07:00
1 parent 1f4029254b
commit e3fd60e9c3
1 file changed
+1 -1
+1 -1
View File
@@ -77,7 +77,7 @@ static off_t search(off_t *I,u_char *old,off_t oldsize,
};
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);