diff options
author | Josh MacDonald <josh.macdonald@gmail.com> | 2015-10-31 14:17:43 -0700 |
---|---|---|
committer | Josh MacDonald <josh.macdonald@gmail.com> | 2015-10-31 14:17:43 -0700 |
commit | 51da9417144e6232832013718cbbe1f2933c102a (patch) | |
tree | 3522ebba13582bcf7f112cf01c1c3fe5bcf4c621 /xdelta3/xdelta3-internal.h | |
parent | e1a0a2538ff9c5a7350562f844c67bfd639fa3f5 (diff) |
Fix an overflow in allocating the three decoder sections
Diffstat (limited to 'xdelta3/xdelta3-internal.h')
-rw-r--r-- | xdelta3/xdelta3-internal.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xdelta3/xdelta3-internal.h b/xdelta3/xdelta3-internal.h index 244192c..d6eb0ac 100644 --- a/xdelta3/xdelta3-internal.h +++ b/xdelta3/xdelta3-internal.h | |||
@@ -221,7 +221,7 @@ void xprintf(const char *fmt, ...) PRINTF_ATTRIBUTE(1,2); | |||
221 | \ | 221 | \ |
222 | do \ | 222 | do \ |
223 | { \ | 223 | { \ |
224 | if (inp == max) \ | 224 | if (inp == maxp) \ |
225 | { \ | 225 | { \ |
226 | stream->msg = "end-of-input in read_integer"; \ | 226 | stream->msg = "end-of-input in read_integer"; \ |
227 | return XD3_INVALID_INPUT; \ | 227 | return XD3_INVALID_INPUT; \ |
@@ -281,7 +281,7 @@ xd3_decode_uint32_t (xd3_stream *stream, uint32_t *val) | |||
281 | 281 | ||
282 | static inline int | 282 | static inline int |
283 | xd3_read_uint32_t (xd3_stream *stream, const uint8_t **inpp, | 283 | xd3_read_uint32_t (xd3_stream *stream, const uint8_t **inpp, |
284 | const uint8_t *max, uint32_t *valp) | 284 | const uint8_t *maxp, uint32_t *valp) |
285 | { READ_INTEGER_TYPE (uint32_t, UINT32_OFLOW_MASK); } | 285 | { READ_INTEGER_TYPE (uint32_t, UINT32_OFLOW_MASK); } |
286 | 286 | ||
287 | #if XD3_ENCODER | 287 | #if XD3_ENCODER |
@@ -306,7 +306,7 @@ xd3_emit_uint64_t (xd3_stream *stream, xd3_output **output, uint64_t num) | |||
306 | #if REGRESSION_TEST | 306 | #if REGRESSION_TEST |
307 | static int | 307 | static int |
308 | xd3_read_uint64_t (xd3_stream *stream, const uint8_t **inpp, | 308 | xd3_read_uint64_t (xd3_stream *stream, const uint8_t **inpp, |
309 | const uint8_t *max, uint64_t *valp) | 309 | const uint8_t *maxp, uint64_t *valp) |
310 | { READ_INTEGER_TYPE (uint64_t, UINT64_OFLOW_MASK); } | 310 | { READ_INTEGER_TYPE (uint64_t, UINT64_OFLOW_MASK); } |
311 | 311 | ||
312 | static uint32_t | 312 | static uint32_t |