[all-commits] [llvm/llvm-project] ee4769: [LLDB] Fix buffer overflow problem in DWARFExpress...

cmtice via All-commits all-commits at lists.llvm.org
Wed Jun 28 11:48:35 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ee476996bec7f170928505a4c5b7715183cfbada
      https://github.com/llvm/llvm-project/commit/ee476996bec7f170928505a4c5b7715183cfbada
  Author: Caroline Tice <cmtice at google.com>
  Date:   2023-06-28 (Wed, 28 Jun 2023)

  Changed paths:
    M lldb/source/Expression/DWARFExpression.cpp

  Log Message:
  -----------
  [LLDB] Fix buffer overflow problem in DWARFExpression::Evaluate.

In two calls to ReadMemory in DWARFExpression.cpp, the buffer size
passed to ReadMemory is not actually the size of the buffer (I suspect
a copy/paste error where the variable name was not properly
updated). This caused a buffer overflow bug, which we found throuth
Address Sanitizer.  This patch fixes the problem by passing the
correct buffer size to the calls to ReadMemory (and to the
DataExtractor).

Differential Revision: https://reviews.llvm.org/D153840




More information about the All-commits mailing list