As discussed on IRC, this is a reasonable change - on 32bit platforms,
having a maximum allocation size of 4G-1 is no good, as that will always
fail (so why bother having that check at all).  1G seems well out of
range of what OpenVPN would ever need, but it *would* catch some program
parts asking for "2Gbyte" and then being surprised that malloc() fails...
(and provide a better FATAL message).

Not tested beyond "BB says it's all green".

Your patch has been applied to the master branch.

commit 2b8149a4fe0d73ea0bedf2e282188d55c8511c45
Author: Frank Lichtenheld
Date:   Fri Dec 12 11:09:14 2025 +0100

     buffer: Change limits for array_mult_safe

     Signed-off-by: Frank Lichtenheld <[email protected]>
     Acked-by: Gert Doering <[email protected]>
     Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1436
     Message-Id: <[email protected]>
     URL: 
https://www.mail-archive.com/[email protected]/msg35044.html
     Signed-off-by: Gert Doering <[email protected]>


--
kind regards,

Gert Doering



_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to