Skip to content
This repository has been archived by the owner on Apr 23, 2022. It is now read-only.

fix for large decoded value #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

samuelcolvin
Copy link
Owner

fix #2

@codecov
Copy link

codecov bot commented Dec 21, 2017

Codecov Report

Merging #3 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##           master     #3   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           3      2    -1     
  Lines          44     42    -2     
=====================================
- Hits           44     42    -2

@mwojnars
Copy link

Hi! Have you pushed this change to PyPI ? I installed xdelta3 from there and it still produces an error. I checked the installed files and _xdelta3.c contains old version of code, from before the fix.

Example strings that reproduce the error:

a = b'wonderful string to demonstrate xdelta3, much of these two strings is the same.'
b = b'diff string to demonstrate xdelta3, 888888888888888888888888888888888888888888888888888888888888 much of these two strings is the same.'

BTW, in this example, delta is very short despite many 8's inserted. Do you detect repetitions and compress them somehow, in addition to making plain diff comparison?

@samuelcolvin
Copy link
Owner Author

This isn't on pypi

BTW, in this example, delta is very short despite many 8's inserted. Do you detect repetitions and compress them somehow, in addition to making plain diff comparison?

This repo is just a wrapper around xdelta, have a look there for details on how the delta encoding works.

if (result != ENOSPC) {
break;
}
output_alloc = output_alloc * 2;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add main_free(output_buf); here to avoid leaking memory.

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

Successfully merging this pull request may close these issues.

xdelta3.XDeltaError: Output of decoding delta longer than expected
3 participants