Alexandre Julliard : winecfg: Fix potential null pointer access ( spotted by Yaroslav Skorokhodov).

Vitaly Lipatov lav at etersoft.ru
Tue Jun 12 06:39:07 CDT 2007


В сообщении от 12 июня 2007 Alexandre Julliard написал(a):
...
> @@ -107,7 +107,7 @@ static void update_comboboxes(HWND dialog)
>      winver = get_reg_key(config_key, keypath(""), "Version", "");
What wrong with call get_reg_key (,,,NULL) ? Why we need winver as NULL 
pointer and as empty string?

>      ver = get_registry_version();
>
> -    if (*winver == '\0')
> +    if (!winver || !winver[0])
>      {
>          HeapFree(GetProcessHeap(), 0, winver);



-- 
Lav
Виталий Липатов
Россия, Санкт-Петербург. www.etersoft.ru
GNU! ALT Linux Team! WINE! WIKI! LaTeX! LyX!



More information about the wine-devel mailing list