Skip to content

Commit

Permalink
fix potential null pointer deref found by coverity (#188)
Browse files Browse the repository at this point in the history
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 );
  • Loading branch information
chipitsine authored Oct 7, 2024
1 parent 9c30b88 commit 5fe9f74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion odbcinst/SQLInstallDriverEx.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ BOOL INSTAPI SQLInstallDriverExW(LPCWSTR lpszDriver,
pout = NULL;
}

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

if ( ret )
{
Expand Down

0 comments on commit 5fe9f74

Please sign in to comment.