From ac044acb7d86ccf445e91a2b2c775e9c75d967cd Mon Sep 17 00:00:00 2001 From: Kamil Hornicek Date: Sat, 11 Feb 2017 10:34:35 +0000 Subject: [PATCH] [UMPNPMGR] - Fix a possible null pointer dereference. CID 515158 svn path=/trunk/; revision=73770 --- reactos/base/services/umpnpmgr/umpnpmgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reactos/base/services/umpnpmgr/umpnpmgr.c b/reactos/base/services/umpnpmgr/umpnpmgr.c index 03fd855c946..e1e7e5c5573 100644 --- a/reactos/base/services/umpnpmgr/umpnpmgr.c +++ b/reactos/base/services/umpnpmgr/umpnpmgr.c @@ -993,7 +993,9 @@ PNP_GetDeviceRegProp( } done: - *pulTransferLen = (ret == CR_SUCCESS) ? *pulLength : 0; + + if(pulTransferLen) + *pulTransferLen = (ret == CR_SUCCESS) ? *pulLength : 0; if (hKey != NULL) RegCloseKey(hKey);