> Nah, sprinkling checks on checks on checks when nothing bad actually happens
> only makes the code less readable in the end. Again, forest from the trees.
> Thanks for the detailed analysis of the case though.
You’re welcome!
> I'd much rather spend time treating causes than syndroms, such
Nah, sprinkling checks on checks on checks when nothing bad actually happens
only makes the code less readable in the end. Again, forest from the trees.
Thanks for the detailed analysis of the case though.
I'd much rather spend time treating causes than syndroms, such as looking into
Closed #1494.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1494#event-4340683537___
Rpm-maint mailing list
This overflow does not result in any form of memory unsafety or undefined
behavior. `REGION_TAG_OFFSET` is of type `size_t`, so `einfo.offset` gets
promoted to `size_t`. That, in turn, causes the addition to wrap around. The
only problematic cases are where `einfo.offset` is negative, but
This ensures adding ‘REGION_TAG_COUNT’ to it will not overflow.
You can view, comment on, or merge this pull request online at:
https://github.com/rpm-software-management/rpm/pull/1494
-- Commit Summary --
* Check that ‘einfo.offset’ is reasonable
-- File Changes --
M lib/header.c (3)