[PATCH] dlls/shell32: always allocate a whole ITEMIDLIST structure
24 Mar
2022
24 Mar
'22
9:13 a.m.
Partially allocating a structure generates -Warray-bounds warnings with GCC11 In this specific case, given the rounding in memory allocators, would even not increase the effective allocated size Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> --- dlls/shell32/pidl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/shell32/pidl.c b/dlls/shell32/pidl.c index 4c66a14c700..f9c91a79132 100644 --- a/dlls/shell32/pidl.c +++ b/dlls/shell32/pidl.c @@ -1574,7 +1574,7 @@ LPITEMIDLIST _ILCreateDesktop(void) LPITEMIDLIST ret; TRACE("()\n"); - ret = SHAlloc(2); + ret = SHAlloc(sizeof(*ret)); if (ret) ret->mkid.cb = 0; return ret;
1367
Age (days ago)
1367
Last active (days ago)
0 comments
1 participants
participants (1)
-
Eric Pouech