diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2012-03-06 16:23:50 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2012-03-06 16:23:50 +0100 |
commit | 59655077c5bf176f01d8d277665ebb92263704ed (patch) | |
tree | 0d4393ea09ebe90e35866d27041faf6372f6e87e /include | |
parent | 17eedcad9406c43beddab3906c8c693626c351fb (diff) | |
download | busybox-w32-59655077c5bf176f01d8d277665ebb92263704ed.tar.gz busybox-w32-59655077c5bf176f01d8d277665ebb92263704ed.tar.bz2 busybox-w32-59655077c5bf176f01d8d277665ebb92263704ed.zip |
preparatory cleanups for seamless uncompression improvements
unpack_gz_stream_with_info: fix buggy error check
man: fix possible accesses past the end of a string
move seamless uncompression helpers from read_printf.c to open_transformer.c
function old new delta
show_manpage 153 212 +59
unpack_gz_stream_with_info 520 539 +19
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h index f743bdfc6..c896e5484 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -713,6 +713,14 @@ extern void *xmalloc_read(int fd, size_t *maxsz_p) FAST_FUNC RETURNS_MALLOC; | |||
713 | extern void *xmalloc_open_read_close(const char *filename, size_t *maxsz_p) FAST_FUNC RETURNS_MALLOC; | 713 | extern void *xmalloc_open_read_close(const char *filename, size_t *maxsz_p) FAST_FUNC RETURNS_MALLOC; |
714 | /* Never returns NULL */ | 714 | /* Never returns NULL */ |
715 | extern void *xmalloc_xopen_read_close(const char *filename, size_t *maxsz_p) FAST_FUNC RETURNS_MALLOC; | 715 | extern void *xmalloc_xopen_read_close(const char *filename, size_t *maxsz_p) FAST_FUNC RETURNS_MALLOC; |
716 | |||
717 | #define SEAMLESS_COMPRESSION (0 \ | ||
718 | || ENABLE_FEATURE_SEAMLESS_XZ \ | ||
719 | || ENABLE_FEATURE_SEAMLESS_LZMA \ | ||
720 | || ENABLE_FEATURE_SEAMLESS_BZ2 \ | ||
721 | || ENABLE_FEATURE_SEAMLESS_GZ \ | ||
722 | || ENABLE_FEATURE_SEAMLESS_Z) | ||
723 | |||
716 | /* Autodetects gzip/bzip2 formats. fd may be in the middle of the file! */ | 724 | /* Autodetects gzip/bzip2 formats. fd may be in the middle of the file! */ |
717 | #if ENABLE_FEATURE_SEAMLESS_LZMA \ | 725 | #if ENABLE_FEATURE_SEAMLESS_LZMA \ |
718 | || ENABLE_FEATURE_SEAMLESS_BZ2 \ | 726 | || ENABLE_FEATURE_SEAMLESS_BZ2 \ |