Skip to content

Commit 5fe9f74

Browse files
authored
fix potential null pointer deref found by coverity (#188)
CID 442487: (#1 of 1): Explicit null dereferenced (FORWARD_NULL) 5. var_deref_model: Passing null pointer pout to SQLInstallDriverEx, which dereferences it. [Note: The source code implementation of the function has been overridden by a builtin model.] 251 ret = SQLInstallDriverEx( drv, pth, pout, cbPathOutMax, &len, fRequest, lpdwUsageCount );
1 parent 9c30b88 commit 5fe9f74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

odbcinst/SQLInstallDriverEx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ BOOL INSTAPI SQLInstallDriverExW(LPCWSTR lpszDriver,
248248
pout = NULL;
249249
}
250250

251-
ret = SQLInstallDriverEx( drv, pth, pout, cbPathOutMax, &len, fRequest, lpdwUsageCount );
251+
ret = pout ? SQLInstallDriverEx( drv, pth, pout, cbPathOutMax, &len, fRequest, lpdwUsageCount ) : FALSE;
252252

253253
if ( ret )
254254
{

0 commit comments

Comments
 (0)