Re: Alexandre Julliard : winecfg: Fix potential null pointer access ( spotted by Yaroslav Skorokhodov).
В сообщении от 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!
Vitaly Lipatov <lav(a)etersoft.ru> writes:
В сообщении от 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?
This way it also handles the case where you have an empty string and not just a missing entry. Not really fundamental, but since the code already handles this there's no reason to break it. -- Alexandre Julliard julliard(a)winehq.org
participants (2)
-
Alexandre Julliard -
Vitaly Lipatov