summaryrefslogtreecommitdiff
path: root/xdelta3/xdelta3-djw.h
diff options
context:
space:
mode:
authorjosh.macdonald <jmacd@users.noreply.github.com>2007-09-22 23:39:58 +0000
committerjosh.macdonald <jmacd@users.noreply.github.com>2007-09-22 23:39:58 +0000
commitaac50eca57b177a84e7a5a17f91b87ce2b3183d0 (patch)
treebc3d04a2dedb24c48e80d87ddcc646eb99fb48e0 /xdelta3/xdelta3-djw.h
parent94fc679c61ca73182ba9d473a36253364f8f1967 (diff)
Fixes:
1. Encoder was improperly setting stream->min_match on re-entry following XD3_GETSRCBLK events. 2. Decoder was improperly terminating a loop when XD3_GETSRCBLK events occur while decoding the final instruction. 3. An known assertion failure in djw_compute_mtf_1_2 will abort() in non-debug mode instead of running out of memory.
Diffstat (limited to 'xdelta3/xdelta3-djw.h')
-rw-r--r--xdelta3/xdelta3-djw.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/xdelta3/xdelta3-djw.h b/xdelta3/xdelta3-djw.h
index 19f7ca0..dc3e70b 100644
--- a/xdelta3/xdelta3-djw.h
+++ b/xdelta3/xdelta3-djw.h
@@ -537,6 +537,9 @@ djw_compute_mtf_1_2 (djw_prefix *prefix,
537 for (j = 0; mtf[j] != sym; j += 1) { } 537 for (j = 0; mtf[j] != sym; j += 1) { }
538 538
539 XD3_ASSERT (j < nsym); 539 XD3_ASSERT (j < nsym);
540 /* TODO: A reported test case triggers this assertion in debug and
541 * crashes (out of memory) in non-debug mode. Catch it here until fixed: */
542 if (j >= nsym) { abort(); }
540 543
541 for (k = j; k >= 1; k -= 1) { mtf[k] = mtf[k-1]; } 544 for (k = j; k >= 1; k -= 1) { mtf[k] = mtf[k-1]; }
542 545