Module: wine Branch: master Commit: e62dd2a5b62a6a75d9bcaec29e80b31eb257c41d URL: https://source.winehq.org/git/wine.git/?a=commit;h=e62dd2a5b62a6a75d9bcaec29...
Author: Eric Pouech eric.pouech@gmail.com Date: Thu Mar 24 10:13:26 2022 +0100
shell32: Always allocate a whole ITEMIDLIST structure.
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@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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;