aboutsummaryrefslogtreecommitdiff
path: root/decompress.c
diff options
context:
space:
mode:
Diffstat (limited to 'decompress.c')
-rw-r--r--decompress.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/decompress.c b/decompress.c
index cdced18..e921347 100644
--- a/decompress.c
+++ b/decompress.c
@@ -8,7 +8,7 @@
8 This file is a part of bzip2 and/or libbzip2, a program and 8 This file is a part of bzip2 and/or libbzip2, a program and
9 library for lossless, block-sorting data compression. 9 library for lossless, block-sorting data compression.
10 10
11 Copyright (C) 1996-2000 Julian R Seward. All rights reserved. 11 Copyright (C) 1996-2002 Julian R Seward. All rights reserved.
12 12
13 Redistribution and use in source and binary forms, with or without 13 Redistribution and use in source and binary forms, with or without
14 modification, are permitted provided that the following conditions 14 modification, are permitted provided that the following conditions
@@ -235,18 +235,18 @@ Int32 BZ2_decompress ( DState* s )
235 switch (s->state) { 235 switch (s->state) {
236 236
237 GET_UCHAR(BZ_X_MAGIC_1, uc); 237 GET_UCHAR(BZ_X_MAGIC_1, uc);
238 if (uc != 'B') RETURN(BZ_DATA_ERROR_MAGIC); 238 if (uc != BZ_HDR_B) RETURN(BZ_DATA_ERROR_MAGIC);
239 239
240 GET_UCHAR(BZ_X_MAGIC_2, uc); 240 GET_UCHAR(BZ_X_MAGIC_2, uc);
241 if (uc != 'Z') RETURN(BZ_DATA_ERROR_MAGIC); 241 if (uc != BZ_HDR_Z) RETURN(BZ_DATA_ERROR_MAGIC);
242 242
243 GET_UCHAR(BZ_X_MAGIC_3, uc) 243 GET_UCHAR(BZ_X_MAGIC_3, uc)
244 if (uc != 'h') RETURN(BZ_DATA_ERROR_MAGIC); 244 if (uc != BZ_HDR_h) RETURN(BZ_DATA_ERROR_MAGIC);
245 245
246 GET_BITS(BZ_X_MAGIC_4, s->blockSize100k, 8) 246 GET_BITS(BZ_X_MAGIC_4, s->blockSize100k, 8)
247 if (s->blockSize100k < '1' || 247 if (s->blockSize100k < (BZ_HDR_0 + 1) ||
248 s->blockSize100k > '9') RETURN(BZ_DATA_ERROR_MAGIC); 248 s->blockSize100k > (BZ_HDR_0 + 9)) RETURN(BZ_DATA_ERROR_MAGIC);
249 s->blockSize100k -= '0'; 249 s->blockSize100k -= BZ_HDR_0;
250 250
251 if (s->smallDecompress) { 251 if (s->smallDecompress) {
252 s->ll16 = BZALLOC( s->blockSize100k * 100000 * sizeof(UInt16) ); 252 s->ll16 = BZALLOC( s->blockSize100k * 100000 * sizeof(UInt16) );