mirror of
https://github.com/expo/bsdiff.git
synced 2026-11-14 17:49:03 -10:00
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:
1 parent
1f4029254b
commit
e3fd60e9c3
1 file changed
+1
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user