[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

Balázs Kéri via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 8 01:33:12 PST 2024


balazske wrote:

Additionally, the checked preconditions look not exact. For example the POSIX documentation for `getdelim` says: "If *n is non-zero, the application shall ensure that *lineptr either points to an object of size at least *n bytes, or is a null pointer." This means `*lineptr` can be NULL when `*n` is a nonzero value. The buffer size of `*lineptr` could be checked that is at least `*n` (if `*lineptr` is not NULL).

https://github.com/llvm/llvm-project/pull/83027


More information about the cfe-commits mailing list