Revert "diff-delta.c: allow delta with empty blob."
This reverts 962537a3eb
commit to
play safe.
This commit is contained in:
parent
44db136cad
commit
c7a45bd20e
4
delta.h
4
delta.h
@ -9,8 +9,8 @@ extern void *patch_delta(void *src_buf, unsigned long src_size,
|
|||||||
void *delta_buf, unsigned long delta_size,
|
void *delta_buf, unsigned long delta_size,
|
||||||
unsigned long *dst_size);
|
unsigned long *dst_size);
|
||||||
|
|
||||||
/* the smallest possible delta size is 2 bytes (empty to empty) */
|
/* the smallest possible delta size is 4 bytes */
|
||||||
#define DELTA_SIZE_MIN 2
|
#define DELTA_SIZE_MIN 4
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This must be called twice on the delta data buffer, first to get the
|
* This must be called twice on the delta data buffer, first to get the
|
||||||
|
@ -213,7 +213,7 @@ void *diff_delta(void *from_buf, unsigned long from_size,
|
|||||||
bdrecord_t *brec;
|
bdrecord_t *brec;
|
||||||
bdfile_t bdf;
|
bdfile_t bdf;
|
||||||
|
|
||||||
if (delta_prepare(from_buf, from_size, &bdf))
|
if (!from_size || !to_size || delta_prepare(from_buf, from_size, &bdf))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
outpos = 0;
|
outpos = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user