[Rpm-maint] [rpm-software-management/rpm] Use int64_t for lengths (#1492)

Panu Matilainen notifications at github.com
Thu Feb 18 09:08:23 UTC 2021


@pmatilai commented on this pull request.



> @@ -1863,13 +1862,7 @@ static rpmRC hdrblobVerifyRegion(rpmTagVal regionTag, int exact_size,
 	goto exit;
     }
 
-    /*
-     * Trailer offset is negative and has a special meaning.  Be sure to negate
-     * *after* the division, so the negation cannot overflow.  The parentheses
-     * around the division are required!
-     *
-     * Thankfully, the modulus operator works fine on negative numbers.
-     */
+    /* Negate after division to avoid overflow.  Watch out for precedence! */

If you want to change this comment, put it into a separate commit (no need for separate PR though). Having it here makes it look like it's somehow related to this code change, when it isn't.

-- 
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/1492#pullrequestreview-592990484
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20210218/41d74bac/attachment-0001.html>


More information about the Rpm-maint mailing list