static analysis and cast of argument

pull/156/head
Jacob Barthelmeh 2019-04-22 16:13:40 -06:00
parent fbbd3aa552
commit cfe2aafbf0
2 changed files with 6 additions and 1 deletions

View File

@ -1127,7 +1127,7 @@ THREAD_RETURN WOLFSSH_THREAD sftpclient_test(void* args)
n = NULL;
}
ret = doCmds(args);
ret = doCmds((func_args*)args);
XFREE(workingDir, NULL, DYNAMIC_TYPE_TMP_BUFFER);
if (ret == WS_SUCCESS) {
if (wolfSSH_shutdown(ssh) != WS_SUCCESS) {

View File

@ -2178,6 +2178,11 @@ int wsScpSendCallback(WOLFSSH* ssh, int state, const char* peerRequest,
}
ret = FindNextDirEntry(sendCtx);
/* help out static analysis tool */
if (ret != WS_BAD_ARGUMENT && sendCtx == NULL)
ret = WS_BAD_ARGUMENT;
if (ret == WS_SUCCESS || ret == WS_NEXT_ERROR) {
#ifdef WOLFSSL_NUCLEUS