[all-commits] [llvm/llvm-project] 7d3729: [clang-tidy] Fix crash in bugprone-not-null-termin...

Endre Fülöp via All-commits all-commits at lists.llvm.org
Wed Oct 15 08:16:51 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7d3729d381a0d6d091e4f4929b9a5f06f6cba906
      https://github.com/llvm/llvm-project/commit/7d3729d381a0d6d091e4f4929b9a5f06f6cba906
  Author: Endre Fülöp <endre.fulop at sigmatechnology.com>
  Date:   2025-10-15 (Wed, 15 Oct 2025)

  Changed paths:
    M clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp
    M clang-tools-extra/docs/ReleaseNotes.rst
    A clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-value-dependent-crash.cpp

  Log Message:
  -----------
  [clang-tidy] Fix crash in bugprone-not-null-terminated-result check (#160727)

The check was crashing when trying to evaluate value-dependent
expressions using EvaluateAsInt() in cases where the src parameter of
memcpy is value-dependent, but the length is not. Added
isValueDependent() check before EvaluateAsInt() call to prevent the
crash.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list