Re: [RFC PATCH vdagent 01/16] Fix 'Run-Time Check Failure #2' when running a 64bit guest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> From: Sandy Stutsman <sstutsma@xxxxxxxxxx>
> 
> ---
>  vdagent/display_setting.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/vdagent/display_setting.cpp b/vdagent/display_setting.cpp
> index 1ec7397..f5eb0d7 100644
> --- a/vdagent/display_setting.cpp
> +++ b/vdagent/display_setting.cpp
> @@ -306,7 +306,7 @@ bool DisplaySetting::reload_wallpaper(HKEY
> desktop_reg_key)
>          wallpaper_path[value_size] = '\0';
>      }
>  
> -    if (SystemParametersInfo(SPI_GETDESKWALLPAPER, sizeof(cur_wallpaper),
> cur_wallpaper, 0)) {
> +    if (SystemParametersInfo(SPI_GETDESKWALLPAPER, MAX_PATH, cur_wallpaper,
> 0)) {
>          if (_tcscmp(cur_wallpaper, TEXT("")) != 0) {
>              vd_printf("wallpaper wasn't disabled");
>              return true;

I would prefer a SPICE_N_ELEMENTS here. The problem is that SystemParametersInfo
wants the size in character not bytes.

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]