Module: wine Branch: master Commit: 96b1c96c88e770794bea5f8082a8691d41ff6fd9 URL: https://source.winehq.org/git/wine.git/?a=commit;h=96b1c96c88e770794bea5f808...
Author: Alistair Leslie-Hughes leslie_alistair@hotmail.com Date: Sun Oct 20 10:26:58 2019 +0000
dpnet: Initialize size before call to RegGetValueW (Coverity).
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/dpnet/peer.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/dpnet/peer.c b/dlls/dpnet/peer.c index f935b2a313..7536af6796 100644 --- a/dlls/dpnet/peer.c +++ b/dlls/dpnet/peer.c @@ -157,6 +157,7 @@ HRESULT enum_services_providers(const GUID * const service, DPN_SERVICE_PROVIDER next_key = RegEnumKeyW( key, index, provider, MAX_PATH); while(next_key == ERROR_SUCCESS) { + size = 0; res = RegGetValueW(key, provider, friendly, RRF_RT_REG_SZ, NULL, NULL, &size); if(res == ERROR_SUCCESS) { @@ -198,6 +199,7 @@ HRESULT enum_services_providers(const GUID * const service, DPN_SERVICE_PROVIDER next_key = RegEnumKeyW( key, index, provider, MAX_PATH); while(next_key == ERROR_SUCCESS) { + size = 0; res = RegGetValueW(key, provider, friendly, RRF_RT_REG_SZ, NULL, NULL, &size); if(res == ERROR_SUCCESS) {