https://github.com/Kitware/CMake
Revision 88f90a72f11bfdd16da63681ba3a5c482cf07304 authored by Evan Wilde on 07 August 2023, 18:14:14 UTC, committed by Brad King on 07 August 2023, 23:17:29 UTC
Refactoring in commit bff468c988 (cmFileCommand: Use cm::optional for keyword argument presence, 2022-06-30, v3.25.0-rc1~512^2) accidentally broke the check that the input argument is either `INPUT` or `CONTENT`. The check is supposed to fail when arguments are passed in the wrong order. For example: file(GENERATE OUTPUT ... TARGET <target> CONTENT <content>) Prior to this fix, the input method would be CONTENT, but because the first parsed keyword is not `CONTENT`, `inputIsContent` would be false. The first parsed keyword isn't INPUT either, so we would not continue into the error condition. CMake would then try to handle this as an input file, when there isn't one, resulting in uninitialized memory usage and segfaults or corruption later on. Fixes: #25169
1 parent cbcd297
Tip revision: 88f90a72f11bfdd16da63681ba3a5c482cf07304 authored by Evan Wilde on 07 August 2023, 18:14:14 UTC
file(GENERATE): Restore INPUT|CONTENT parse checking
file(GENERATE): Restore INPUT|CONTENT parse checking
Tip revision: 88f90a7
File | Mode | Size |
---|---|---|
.github | ||
.gitlab | ||
Auxiliary | ||
Help | ||
Licenses | ||
Modules | ||
Packaging | ||
Source | ||
Templates | ||
Tests | ||
Utilities | ||
.clang-format | -rw-r--r-- | 1.4 KB |
.clang-tidy | -rw-r--r-- | 1.8 KB |
.codespellrc | -rw-r--r-- | 644 bytes |
.editorconfig | -rw-r--r-- | 164 bytes |
.gitattributes | -rw-r--r-- | 1.2 KB |
.gitignore | -rw-r--r-- | 422 bytes |
.gitlab-ci.yml | -rw-r--r-- | 34.5 KB |
.hooks-config | -rw-r--r-- | 418 bytes |
CMakeCPack.cmake | -rw-r--r-- | 9.9 KB |
CMakeCPackOptions.cmake.in | -rw-r--r-- | 12.0 KB |
CMakeGraphVizOptions.cmake | -rw-r--r-- | 153 bytes |
CMakeLists.txt | -rw-r--r-- | 21.0 KB |
CMakeLogo.gif | -rw-r--r-- | 4.4 KB |
CONTRIBUTING.rst | -rw-r--r-- | 3.0 KB |
CTestConfig.cmake | -rw-r--r-- | 566 bytes |
CTestCustom.cmake.in | -rw-r--r-- | 7.3 KB |
CompileFlags.cmake | -rw-r--r-- | 5.0 KB |
Copyright.txt | -rw-r--r-- | 5.3 KB |
DartConfig.cmake | -rw-r--r-- | 374 bytes |
README.rst | -rw-r--r-- | 3.9 KB |
bootstrap | -rwxr-xr-x | 64.6 KB |
cmake_uninstall.cmake.in | -rw-r--r-- | 789 bytes |
configure | -rwxr-xr-x | 99 bytes |
Computing file changes ...