Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 18 Mar 2024 22:39:25 +0000 (UTC)
From: Thorsten Glaser <tg@...bsd.de>
To: musl@...ts.openwall.com
Subject: Re: Potential bug in __res_msend_rc() wrt to union initialisation.

NRK dixit:

>So something like:
>
>	static union u zero;
>	union u u = zero;

Even that gets funny when you have:

union {
	struct {
		char *foo;
		uintptr_t bar;
	} a;
	struct {
		uintptr_t baz;
		char *bla;
	} b;
} u;

In this case, u.b.baz can very well be 0x55555555
when you initialise u.a as {} (C23+) or {0}, e.g.
on TenDRA with the option to have nil pointers be
not a binary 0-bits representation.

bye,
//mirabilos
-- 
22:20⎜<asarch> The crazy that persists in his craziness becomes a master
22:21⎜<asarch> And the distance between the craziness and geniality is
only measured by the success 18:35⎜<asarch> "Psychotics are consistently
inconsistent. The essence of sanity is to be inconsistently inconsistent

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.