diff options
author | Zsolt Parragi <zsolt.parragi@cancellar.hu> | 2019-02-12 20:01:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-02-13 15:22:59 (GMT) |
commit | 76a5ac210050e0c1ccdce8ce89a0c77579e30187 (patch) | |
tree | d4aa8697e9f704b34cbf40854b9dd3ac5aeb1408 | |
parent | 6f23321d405930241fa431cfda7650f2993f0c19 (diff) | |
download | CMake-76a5ac210050e0c1ccdce8ce89a0c77579e30187.zip CMake-76a5ac210050e0c1ccdce8ce89a0c77579e30187.tar.gz CMake-76a5ac210050e0c1ccdce8ce89a0c77579e30187.tar.bz2 |
cmListFileLexer: Add missing include to avoid possible pointer truncation
The `cmsys/Enconding.h` include had a typo in its surrounding 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.
-rw-r--r-- | Source/LexerParser/cmListFileLexer.c | 2 | ||||
-rw-r--r-- | Source/LexerParser/cmListFileLexer.in.l | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Source/LexerParser/cmListFileLexer.c b/Source/LexerParser/cmListFileLexer.c index c726415..15dcda0 100644 --- a/Source/LexerParser/cmListFileLexer.c +++ b/Source/LexerParser/cmListFileLexer.c @@ -766,7 +766,7 @@ Modify cmListFileLexer.c: /* IWYU pragma: no_forward_declare yyguts_t */ -#ifdef WIN32 +#ifdef _WIN32 #include "cmsys/Encoding.h" #endif diff --git a/Source/LexerParser/cmListFileLexer.in.l b/Source/LexerParser/cmListFileLexer.in.l index 6a6fb5f..fdf14d2 100644 --- a/Source/LexerParser/cmListFileLexer.in.l +++ b/Source/LexerParser/cmListFileLexer.in.l @@ -18,7 +18,7 @@ Modify cmListFileLexer.c: /* IWYU pragma: no_forward_declare yyguts_t */ -#ifdef WIN32 +#ifdef _WIN32 #include "cmsys/Encoding.h" #endif |