Skip to content

hwcaps: check elf_aux_info() return value in GetElfHwcapFromElfAuxInfo - #475

Merged
gchatelet merged 1 commit into
google:mainfrom
brad0:elf_aux_info_check
Oct 20, 2026
Merged

gchatelet merged 1 commit into
google:mainfrom
brad0:elf_aux_info_check

Conversation

@brad0

@brad0 brad0 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Do not rely on elf_aux_info() leaving the output buffer untouched on
failure, since that is not part of its documented contract. Check the
return value and set hwcap to 0 on error.

@brad0

brad0 commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

Ping.

@gchatelet

Copy link
Copy Markdown
Collaborator

Sorry I missed the patch... Can you clang-format it please?

@brad0
brad0 force-pushed the elf_aux_info_check branch 2 times, most recently from 8bbf9e2 to fbcad8a Compare October 20, 2026 08:40
@brad0

brad0 commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

Sorry I missed the patch... Can you clang-format it please?

Done.

That formatting is horrible.

Comment thread src/hwcaps_freebsd_or_openbsd.c Outdated
Do not rely on elf_aux_info() leaving the output buffer untouched on
failure, since that is not part of its documented contract. Check the
return value and set hwcap to 0 on error.
@brad0
brad0 force-pushed the elf_aux_info_check branch from fbcad8a to 4b6a1fe Compare October 20, 2026 08:50
@gchatelet
gchatelet merged commit 4814778 into google:main Oct 20, 2026
38 of 40 checks passed
@gchatelet

Copy link
Copy Markdown
Collaborator

Thx @brad0 !

@brad0
brad0 deleted the elf_aux_info_check branch October 20, 2026 12:48
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.

2 participants