VYPR
Unrated severityNVD Advisory· Published Jul 28, 2018· Updated Aug 5, 2024

CVE-2018-14682

CVE-2018-14682

Description

An issue was discovered in mspack/chmd.c in libmspack before 0.7alpha. There is an off-by-one error in the TOLOWER() macro for CHM decompression.

Affected products

25

Patches

1
4fd9ccaa54e1

Fix off-by-one error in chmd TOLOWER() fallback

https://github.com/kyz/libmspackStuart CaieFeb 6, 2018via osv
2 files changed · +6 1
  • libmspack/ChangeLog+5 0 modified
    @@ -1,3 +1,8 @@
    +2018-02-06  Stuart Caie <[email protected]>
    +
    +	* chmd.c: fixed an off-by-one error in the TOLOWER() macro, reported
    +	by Dmitry Glavatskikh. Thanks Dmitry!
    +
     2017-11-26  Stuart Caie <[email protected]>
     
     	* kwajd_read_headers(): fix up the logic of reading the filename and
    
  • libmspack/mspack/chmd.c+1 1 modified
    @@ -831,7 +831,7 @@ static int search_chunk(struct mschmd_header *chm,
     # endif
     # define TOLOWER(x) tolower(x)
     #else
    -# define TOLOWER(x) (((x)<0||(x)>256)?(x):mspack_tolower_map[(x)])
    +# define TOLOWER(x) (((x)<0||(x)>255)?(x):mspack_tolower_map[(x)])
     /* Map of char -> lowercase char for the first 256 chars. Generated with:
      * LC_CTYPE=en_GB.utf-8 perl -Mlocale -le 'print map{ord(lc chr).","} 0..255'
      */
    

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

13

News mentions

0

No linked articles in our index yet.