aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2008-04-24 17:30:51 +0300
committerLasse Collin <lasse.collin@tukaani.org>2008-04-24 17:30:51 +0300
commit7ab493924e0ed590a5121a15ee54038d238880d3 (patch)
tree6950011909247c359c5fe823dcd96f59eb75e73c /src/liblzma
parentReplaced the range decoder optimization that used arithmetic (diff)
downloadxz-7ab493924e0ed590a5121a15ee54038d238880d3.tar.xz
Use 64-bit integer as range encoder's cache size. This fixes a
theoretical data corruption, which should be very hard to trigger even intentionally.
Diffstat (limited to 'src/liblzma')
-rw-r--r--src/liblzma/rangecoder/range_encoder.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liblzma/rangecoder/range_encoder.h b/src/liblzma/rangecoder/range_encoder.h
index 113f38a4..b216e648 100644
--- a/src/liblzma/rangecoder/range_encoder.h
+++ b/src/liblzma/rangecoder/range_encoder.h
@@ -26,8 +26,8 @@
typedef struct {
uint64_t low;
+ uint64_t cache_size;
uint32_t range;
- uint32_t cache_size;
uint8_t cache;
} lzma_range_encoder;