[all-commits] [llvm/llvm-project] f97dcd: [llvm-libtool-darwin] Ensure filelist buffer is nu...
stephenduong1004 via All-commits
all-commits at lists.llvm.org
Fri Jul 17 14:11:55 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f97dcd05eb4be690dcfd39de9f6de937d5acfa46
https://github.com/llvm/llvm-project/commit/f97dcd05eb4be690dcfd39de9f6de937d5acfa46
Author: stephenduong1004 <stephenduong at google.com>
Date: 2026-07-17 (Fri, 17 Jul 2026)
Changed paths:
M llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
Log Message:
-----------
[llvm-libtool-darwin] Ensure filelist buffer is null-terminated (#205115)
[llvm-libtool-darwin] Ensure filelist buffer is null-terminated
In llvm-libtool-darwin.cpp, `MemoryBuffer::getFileOrSTDIN` was
previously called to load the filelist with `RequiresNullTerminator` set
to `false`. However, the retrieved buffer is subsequently passed to
`llvm::line_iterator`.
Since `llvm::line_iterator` explicitly requires its underlying buffer to
be null-terminated, omitting this requirement can result in an
out-of-bounds read/buffer overrun when parsing the file list.
This change fixes the issue by requesting a null-terminated buffer
(`RequiresNullTerminator=true`).
Co-authored-by: Alexander Shaposhnikov <ashaposhnikov at google.com>
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