[all-commits] [llvm/llvm-project] 4af152: [lld-macho] Rework length check when opening input...

Greg McGary via All-commits all-commits at lists.llvm.org
Tue Mar 2 13:01:21 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4af1522a855e94c909630a1f1962241c1573eac8
      https://github.com/llvm/llvm-project/commit/4af1522a855e94c909630a1f1962241c1573eac8
  Author: Greg McGary <gkm at fb.com>
  Date:   2021-03-02 (Tue, 02 Mar 2021)

  Changed paths:
    M lld/MachO/Driver.cpp
    M lld/MachO/DriverUtils.cpp
    M lld/MachO/InputFiles.cpp
    M lld/MachO/InputFiles.h
    R lld/test/MachO/invalid/tiny-input.s
    M lld/test/MachO/rename.s

  Log Message:
  -----------
  [lld-macho] Rework length check when opening input files

This reverts diff D97610 (commit 0223ab035c199e537a0040857ba147ced87fd533) and adds a one-line fix to verify that a `MemoryBufferRef` has sufficient length before reading a 4-byte magic number.

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




More information about the All-commits mailing list