Re: [Rpm-maint] [rpm-software-management/rpm] Check that len is in range before using it (#1497)
You’re welcome! @pmatilai I wonder if out-of-line documentation would be useful for this. GHC (the Glasgow Haskell Compiler) has a “note” system they use to great effect -- 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/1497#issuecomment-781620340___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Check that len is in range before using it (#1497)
> Scrap the comment though - that deduction belongs to the commit message, not > code. So I actually asked to move the comment into the commit message. But never mind, this is just one of many, many, similar checks that have subtle ordering constraints that aren't explicitly explained anywhere. Thanks for the patch! -- 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/1497#issuecomment-781193048___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Check that len is in range before using it (#1497)
@DemiMarie pushed 1 commit. 22106f5d33628515d22c09c1c15dfd2217535116 Check that len is in range before using it -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/1497/files/c4b8ff447e5dacf7dc9c6d8ee24462964bbb437a..22106f5d33628515d22c09c1c15dfd2217535116 ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Check that len is in range before using it (#1497)
An alternative approach could be using a 64bit type for `end` so it will simply never overflow, but this is nice in that it eliminates the need for separate len test. Scrap the comment though - that deduction belongs to the commit message, not code. -- 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/1497#issuecomment-780500135___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
[Rpm-maint] [rpm-software-management/rpm] Check that len is in range before using it (#1497)
This prevents integer overflows. You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/1497 -- Commit Summary -- * Check that len is in range before using it -- File Changes -- M lib/header.c (8) -- Patch Links -- https://github.com/rpm-software-management/rpm/pull/1497.patch https://github.com/rpm-software-management/rpm/pull/1497.diff -- 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/1497 ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint