From: Martin Koegler <martin.koeg...@chello.at>

Prevent generating delta offsets beyond 4G.

Signed-off-by: Martin Koegler <martin.koeg...@chello.at>
---
 diff-delta.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/diff-delta.c b/diff-delta.c
index 3d5e1ef..633883e 100644
--- a/diff-delta.c
+++ b/diff-delta.c
@@ -454,6 +454,9 @@ create_delta(const struct delta_index *index,
                        moff += msize;
                        msize = left;
 
+                       if (moff > 0xffffffff)
+                               msize = 0;
+
                        if (msize < 4096) {
                                int j;
                                val = 0;
-- 
2.1.4

Reply via email to