From 76a5ac210050e0c1ccdce8ce89a0c77579e30187 Mon Sep 17 00:00:00 2001 From: Zsolt Parragi Date: Tue, 12 Feb 2019 21:01:18 +0100 Subject: 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. --- Source/LexerParser/cmListFileLexer.c | 2 +- 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 -- cgit v0.12