wok diff linux/stuff/linux-lzma-2.6.24.2.u @ rev 1398
Fix: Dropbear failed to start with empty key files.
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Sat Sep 20 08:55:30 2008 +0200 (2008-09-20) |
parents | ab9cca571149 |
children |
line diff
1.1 --- a/linux/stuff/linux-lzma-2.6.24.2.u Mon Feb 18 22:54:56 2008 +0100 1.2 +++ b/linux/stuff/linux-lzma-2.6.24.2.u Sat Sep 20 08:55:30 2008 +0200 1.3 @@ -1624,7 +1624,7 @@ 1.4 1.5 --- linux-2.6.24.2/lib/decompress_unlzma.c 1.6 +++ linux-2.6.24.2/lib/decompress_unlzma.c 1.7 -@@ -0,0 +1,605 @@ 1.8 +@@ -0,0 +1,601 @@ 1.9 +/* Lzma decompressor for Linux kernel. Shamelessly snarfed 1.10 + * from busybox 1.1.1 1.11 + * 1.12 @@ -2050,20 +2050,20 @@ 1.13 + prob_lit = prob + mi; 1.14 + rc_get_bit(&rc, prob_lit, &mi); 1.15 + } 1.16 ++ if (state < 4) 1.17 ++ state = 0; 1.18 ++ else if (state < 10) 1.19 ++ state -= 3; 1.20 ++ else 1.21 ++ state -= 6; 1.22 + previous_byte = (uint8_t) mi; 1.23 -+ 1.24 ++ one_byte: 1.25 + buffer[buffer_pos++] = previous_byte; 1.26 + if (buffer_pos == header.dict_size) { 1.27 + buffer_pos = 0; 1.28 + global_pos += header.dict_size; 1.29 + writebb((char*)buffer, header.dict_size); 1.30 + } 1.31 -+ if (state < 4) 1.32 -+ state = 0; 1.33 -+ else if (state < 10) 1.34 -+ state -= 3; 1.35 -+ else 1.36 -+ state -= 6; 1.37 + } else { 1.38 + int offset; 1.39 + uint16_t *prob_len; 1.40 @@ -2095,13 +2095,7 @@ 1.41 + goto fail; 1.42 + } 1.43 + previous_byte = buffer[pos]; 1.44 -+ buffer[buffer_pos++] = previous_byte; 1.45 -+ if (buffer_pos == header.dict_size) { 1.46 -+ buffer_pos = 0; 1.47 -+ global_pos += header.dict_size; 1.48 -+ writebb((char*)buffer, header.dict_size); 1.49 -+ } 1.50 -+ continue; 1.51 ++ goto one_byte; 1.52 + } else { 1.53 + rc_update_bit_1(&rc, prob); 1.54 + } 1.55 @@ -2225,9 +2219,11 @@ 1.56 + *posp = rc.ptr-rc.buffer; 1.57 + } 1.58 + large_free(buffer); 1.59 ++ large_free(p); 1.60 + return 0; 1.61 + fail: 1.62 + large_free(buffer); 1.63 ++ large_free(p); 1.64 + return -1; 1.65 +} 1.66