Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bspatch: corrupt patch or bzstream ended (3) #2

Closed
Livan-pro opened this issue Mar 19, 2019 · 7 comments
Closed

bspatch: corrupt patch or bzstream ended (3) #2

Livan-pro opened this issue Mar 19, 2019 · 7 comments

Comments

@Livan-pro
Copy link

Hi. I tried generating patch for some .dll file (47.2 MB -> 57.8 MB).
Patch is generated successfully, but bspatch is giving error:
bspatch: corrupt patch or bzstream ended (3):.
I also tried applying this patch (generated with go-bsdiff) with original bspatch. File was patched successfully and target and patched files are identical.
So, I think, there is an error in bspatch?
I can provide files, if you need it.

@gabstv
Copy link
Owner

gabstv commented Mar 19, 2019

Hello. It's possible that there is an error on bspatch. I created some tests but they didn't cover everything apparently. I will look into it tonight.

@gabstv gabstv closed this as completed in ebb2b86 Mar 20, 2019
@gabstv
Copy link
Owner

gabstv commented Mar 20, 2019

It was an issue related to the bzip2 library (bzip2 lib internal buffer cap). Fixed in 1.0.4.

@Livan-pro
Copy link
Author

Now there is another error on the same files: bspatch: corrupt patch or bzstream ended:.

@gabstv
Copy link
Owner

gabstv commented Mar 21, 2019

Can I have a file example to test it? I couldn't reproduce the error.

@gabstv gabstv reopened this Mar 21, 2019
@Livan-pro
Copy link
Author

Yes, I uploaded files here: https://file.io/SU8dij

@gabstv
Copy link
Owner

gabstv commented Mar 21, 2019

I just pushed a hotfix (1.0.5) and ran bsdiff + bspatch on the DLLs:

➜   ls
chrome_new.dll chrome_old.dll
➜  tmp git:(develop) : go run ../cmd/bsdiff/main.go chrome_old.dll chrome_new.dll chrome_patch
➜  tmp git:(develop) : go run ../cmd/bspatch/main.go chrome_old.dll chrome_new2.dll chrome_patch
➜  tmp git:(develop) : ls -al        
total 384136
drwx------@  6 gabs  staff       192 Mar 21 09:50 .
drwxr-xr-x  16 gabs  staff       512 Mar 21 09:41 ..
-rwxr-xr-x@  1 gabs  staff  60694512 Mar 11 10:08 chrome_new.dll
-rw-r--r--   1 gabs  staff  60694512 Mar 21 09:50 chrome_new2.dll
-rwxr-xr-x@  1 gabs  staff  49559552 Nov 26 01:09 chrome_old.dll
-rw-r--r--   1 gabs  staff  25723455 Mar 21 09:46 chrome_patch
➜  tmp git:(develop) : diff chrome_new.dll chrome_new2.dll
➜  tmp git:(develop) : 

It seems to be working fine.

@Livan-pro
Copy link
Author

Yes, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants