Subject: CVS commit: pkgsrc/archivers/libmspack
From: Patrick Welche
Date: 2019-08-05 15:39:24
Message id: 20190805133924.B5FAEFBF4@cvs.NetBSD.org

Log Message:
Update libmspack to 0.10.1alpha

2019-02-18  Stuart Caie <kyzer@cabextract.org.uk>

       * chmd_read_headers(): a CHM file name beginning "::" but shorter
       than 33 bytes will lead to reading past the freshly-allocated name
       buffer - checks for specific control filenames didn't take length
       into account. Thanks to ADLab of Venustech for the report and
       proof of concept.

2019-02-18  Stuart Caie <kyzer@cabextract.org.uk>

       * chmd_read_headers(): CHM files can declare their chunks are any
       size up to 4GB, and libmspack will attempt to allocate that to
       read the file.

       This is not a security issue; libmspack doesn't promise how much
       memory it'll use to unpack files. You can set your own limits by
       returning NULL in a custom mspack_system.alloc() implementation.

       However, it would be good to validate chunk size further. With no
       offical specification, only empirical data is available. All files
       created by hhc.exe have a chunk size of 4096 bytes, and this is
       matched by all the files I've found in the wild, except for one
       which has a chunk size of 8192 bytes, which was created by someone
       developing a CHM file creator 15 years ago, and they appear to
       have abandoned it, so it seems 4096 is a de-facto standard.

       I've changed the "chunk size is not a power of two" warning to
       "chunk size is not 4096", and now only allow chunk sizes between
       22 and 8192 bytes. If you have CHM files with a larger chunk size,
       please send them to me and I'll increase this upper limit.

       Thanks to ADLab of Venustech for the report.

2019-02-18  Stuart Caie <kyzer@cabextract.org.uk>

       * oabd.c: replaced one-shot copying of uncompressed blocks (which
       requires allocating a buffer of the size declared in the header,
       which can be 4GB) with a fixed-size buffer. The buffer size is
       user-controllable with the new msoab_decompressor::set_param()
       method (check you have version 2 of the OAB decompressor), and
       also controls the input buffer used for OAB's LZX decompression.

       Reminder: compression formats can dictate how much memory is
       needed to decompress them. If memory usage is a security concern
       to you, write a custom mspack_system.alloc() that returns NULL
       if "too much" memory is requested. Do not rely on libmspack adding
       special heuristics to know not to request "too much".

       Thanks to ADLab of Venustech for the report.

Files:
RevisionActionfile
1.7modifypkgsrc/archivers/libmspack/Makefile
1.7modifypkgsrc/archivers/libmspack/distinfo