Hi,

On Mon, Nov 02, 2026 at 06:36:29AM -0800, Jeff Bindel wrote:
> On the free_buf_gc() hunk: I believe the two forms are equivalent by
> definition. sizeof(struct gc_entry) already includes any trailing padding
> (C11 6.5.3.4p4), and pointer arithmetic (*e + 1) advances by exactly
> sizeof(**e) bytes (6.5.6p8), so (uint8_t *)(*e + 1) and (uintptr_t)*e +
> sizeof(struct gc_entry) name the same address.

Thanks for digging this up.  I might have seen older compilers do things
differently ("back in the MS-DOS times"), but obviously this is all moot
as we require compiling with C11 these days, and it standardizes things
in a way that makes this secure.  Good :-)

gert
-- 
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             [email protected]

Attachment: signature.asc
Description: PGP signature

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

Reply via email to