[ros-dev] [ros-diffs] [rnaumann] 70314: [EXPLORER]Initialize the propInfo structure before using it. Spotted by Mark Jansen. See CORE-10560

Thomas Faber thomas.faber at reactos.org
Wed Dec 9 20:01:53 UTC 2015


On 2015-12-08 23:54, rnaumann at svn.reactos.org wrote:
> --- trunk/reactos/base/shell/explorer/trayprop.cpp	[iso-8859-1] (original)
> +++ trunk/reactos/base/shell/explorer/trayprop.cpp	[iso-8859-1] Tue Dec  8 22:54:33 2015
> @@ -338,7 +338,7 @@
>  VOID
>  DisplayTrayProperties(IN HWND hwndOwner)
>  {
> -    PROPSHEET_INFO propInfo;
> +    PROPSHEET_INFO propInfo = {0};
>      PROPSHEETHEADER psh;
>      PROPSHEETPAGE psp[2];
>      WCHAR szCaption[256];

I would find this code much easier to understand if you passed 0 as the
start menu page's lParam, since it's not making use of it anyway.
Having it in both made me worry quite a lot about double frees and such
that would happen if both pages used the same structure.




More information about the Ros-dev mailing list