[PATCH] D91787: [llvm-readobj] - Don't crash when relocation table goes past the EOF.
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 20 03:34:35 PST 2020
jhenderson accepted this revision.
jhenderson added a comment.
This revision is now accepted and ready to land.
LGTM, with or without the suggested changes.
================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:141
+ /// Owner object. Used for error reporting.
+ const Binary *Obj;
/// Error prefix. Used for error reporting to provide more information.
----------------
Maybe make this a reference? It can't change after all, and is always valid.
================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:160
+ if (Size > ObjSize - Offset) {
+ reportWarning(
+ createError("unable to read data at 0x" + Twine::utohexstr(Offset) +
----------------
Here and below, maybe `reportUniqueWarning`?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91787/new/
https://reviews.llvm.org/D91787
More information about the llvm-commits
mailing list