[all-commits] [llvm/llvm-project] dde23b: [tools][llvm-lipo] Fix off-by-one error in command...

Alexander Shaposhnikov via All-commits all-commits at lists.llvm.org
Tue Aug 23 12:52:51 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dde23bf98ecb309dd36405cff7270c613834a534
      https://github.com/llvm/llvm-project/commit/dde23bf98ecb309dd36405cff7270c613834a534
  Author: Alexander Shaposhnikov <ashaposhnikov at google.com>
  Date:   2022-08-23 (Tue, 23 Aug 2022)

  Changed paths:
    M llvm/test/tools/llvm-lipo/replace-invalid-input.test
    M llvm/test/tools/llvm-lipo/segalign-invalid-input.test
    M llvm/tools/llvm-lipo/llvm-lipo.cpp

  Log Message:
  -----------
  [tools][llvm-lipo] Fix off-by-one error in command-line argument parsing

makeArrayRef(argv + 1, argc) -> makeArrayRef(argv + 1, argc - 1)
The previous behavior resulted in propagation of the null pointer
into later stages of arguments parsing instead of being automatically
handled by the existing check of MissingArgumentCount.

Test plan: ninja check-all

Differential revision: https://reviews.llvm.org/D132418




More information about the All-commits mailing list