Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/extract/otra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ bool extract_otra(const Reader& r, const Finding& f, SafeRoot& root, const std::
return true;
}

auto tables = otra::parse_otra_tables(r, f.offset, h);
auto tables = otra::parse_otra_tables(r, h);

// Flat subtype: no populated tables — the body is a raw flash image. Write it
// whole so downstream carving / recursion can work on it.
Expand Down
2 changes: 1 addition & 1 deletion src/otra_format.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ inline std::optional<Header> parse_otra(const Reader& r, size_t base) {

// Walk the partition + segment tables and classify the subtype. Never throws;
// on a flat/opaque image it returns Tables{segmented=false} with empty vectors.
inline Tables parse_otra_tables(const Reader& r, size_t base, const Header& h) {
inline Tables parse_otra_tables(const Reader& r, const Header& h) {
Tables t;
if (h.npart == 0 || h.npart > kMaxParts || h.nseg == 0 || h.nseg > kMaxSegs) return t;
if (h.pay_off > r.size()) return t;
Expand Down
2 changes: 1 addition & 1 deletion src/validators/otra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ bool validate_otra(ValidatorCtx& ctx) {
ctx.out.size = r.size() - base;
if (!h.version.empty()) ctx.out.version = h.version;

auto tables = otra::parse_otra_tables(r, base, h);
auto tables = otra::parse_otra_tables(r, h);
ctx.out.compression = tables.segmented ? "lzo1x" : "none";

if (tables.segmented) {
Expand Down
Loading