[Rpm-maint] [rpm-software-management/rpm] Add rreallocn() to librpmio public API (PR #1915)
Demi Marie Obenour
notifications at github.com
Tue Feb 8 14:49:15 UTC 2022
> Based on @DemiMarie 's patch in #1900 but base around realloc() as that's the more flexible call that we'd need anyhow. Add xmallocn() as a shorthand macro instead.
That’s very much fine. There is a caveat with `realloc(x, 0)` (it frees `x` in some implementations, including glibc) but that is not an issue because you explicitly check for both overflow and for the case where either argument to the multiplication is 0.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1915#issuecomment-1032691616
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/1915/c1032691616 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220208/573ee780/attachment.html>
More information about the Rpm-maint
mailing list