[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

Whisperity via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 25 08:35:27 PDT 2018


whisperity added a comment.

I have checked the results, thank you for uploading them, they look solid to me, although I'm not exactly a developer for these projects, without full understanding of what and where allocates and true path-sensitive analysis and memory modelling, they look good. (E.g. one thing this check misses I think is when the allocator returns an explicitly zero-filled memory, because that way the write without the good size is //still// NUL-terminated... but this requires modelling we might just not be capable of, especially not in Clang-Tidy.)

With a bit of focused glancing, the check's code is also understandable, thanks. :)


https://reviews.llvm.org/D45050





More information about the cfe-commits mailing list