Skip to content

cmListFileLexer: Add missing include to avoid possible pointer truncation

Zsolt Parragi requested to merge dutow/cmake:fix-pointer-truncation into master

The cmsys/Enconding.h include in cmListFileLexer.c had a typo in its sorruonding ifdef, possibly causing a missing function declaration (cmsysEncoding_DupToWide). As this is C code, this resulted in the code compiling, but with a truncated return value, possibly causing crashes.

Found when building with clang.exe on Windows.

Edited by Brad King

Merge request reports