Re: [Rpm-maint] [rpm-software-management/rpm] Check that ‘einfo.offset’ is reasonable (#1494)

2021-02-17 Thread Demi Marie Obenour
> 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

Re: [Rpm-maint] [rpm-software-management/rpm] Check that ‘einfo.offset’ is reasonable (#1494)

2021-02-17 Thread Panu Matilainen
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

Re: [Rpm-maint] [rpm-software-management/rpm] Check that ‘einfo.offset’ is reasonable (#1494)

2021-02-17 Thread Panu Matilainen
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

Re: [Rpm-maint] [rpm-software-management/rpm] Check that ‘einfo.offset’ is reasonable (#1494)

2021-02-16 Thread Demi Marie Obenour
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

[Rpm-maint] [rpm-software-management/rpm] Check that ‘einfo.offset’ is reasonable (#1494)

2021-01-13 Thread Demi Marie Obenour
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)