diff options
author | Alejandro Álvarez Ayllón <alejandro.alvarez@sonarsource.com> | 2024-03-06 16:52:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-06 16:52:18 +0100 |
commit | 67c6ad6f30e35c7670bce9bca902caa4b1c8c0e8 (patch) | |
tree | ccdd4596d698a3d35040266502b1390a39fe33c5 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 6540f1635a6566aef93d9b4f568ac648474c39e7 (diff) | |
download | llvm-67c6ad6f30e35c7670bce9bca902caa4b1c8c0e8.zip llvm-67c6ad6f30e35c7670bce9bca902caa4b1c8c0e8.tar.gz llvm-67c6ad6f30e35c7670bce9bca902caa4b1c8c0e8.tar.bz2 |
[clang][analyzer] Model allocation behavior or getdelim/geline (#83138)
`getdelim` and `getline` may free, allocate, or re-allocate the input
buffer, ensuring its size is enough to hold the incoming line, the
delimiter, and the null terminator.
`*lineptr` must be a valid argument to `free`, which means it can be
either
1. `NULL`, in which case these functions perform an allocation
equivalent to a call to `malloc` even on failure.
2. A pointer returned by the `malloc` family of functions. Other
pointers are UB (`alloca`, a pointer to a static, to a stack variable, etc.)
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions