void *delta_buf, unsigned long delta_size,
unsigned long *dst_size);
-/* the smallest possible delta size is 2 bytes (empty to empty) */
-#define DELTA_SIZE_MIN 2
+/* the smallest possible delta size is 4 bytes */
+#define DELTA_SIZE_MIN 4
/*
* This must be called twice on the delta data buffer, first to get the
bdrecord_t *brec;
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;
outpos = 0;