erik.pilkington added reviewers: aaron.ballman, rsmith. erik.pilkington added inline comments.
================ Comment at: clang/lib/Sema/SemaChecking.cpp:422 + size_t StrLen = + std::min(std::max(TypeSize, size_t(1)) - 1, FormatStrRef.size()); + if (!analyze_format_string::ParsePrintfString( ---------------- Wait, does this actually return a smaller length if there is a null-terminator embedded in the string? It looks like Format->getString() returns a StringRef with embedded nul bytes and .size() is returning the length. You might have to do something like: `FormatStrRef.find('0');`. Can you add a test for this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71566/new/ https://reviews.llvm.org/D71566 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits