Skip to content

docs: fix docs for the length field#83

Open
Dr-Emann wants to merge 1 commit into
jclehner:masterfrom
Dr-Emann:push-ntpulxwtuskm
Open

docs: fix docs for the length field#83
Dr-Emann wants to merge 1 commit into
jclehner:masterfrom
Dr-Emann:push-ntpulxwtuskm

Conversation

@Dr-Emann
Copy link
Copy Markdown

@Dr-Emann Dr-Emann commented May 10, 2026

Using the Broadcom repo as canonical:

The field corresponds to ulTotalCompressedLength, and it's set to the sum of the payload size:

https://github.com/Broadcom/aeolus/blob/bdc6835b7e852d446cde086c1a902f89c1dff588/ProgramStore/ProgramStore.cpp#L493-L494

The same also appears to be true in bcm2-utils:

bcm2-utils/psextract.cc

Lines 76 to 86 in 5909b3b

void do_extract(istream& in, const ps_header& ps, size_t length = 0)
{
if (!length) {
length = ps.length();
}
auto buf = make_unique<char[]>(length);
if (!in.read(buf.get(), length)) {
throw runtime_error("read error (data)");
}
, where it reads 'length' bytes after it's already read the header.

See binwalk-ng/binwalk-ng#32 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant