From 2662e43cf197b553736599defe97074ccc70b11d Mon Sep 17 00:00:00 2001 From: John Safranek Date: Wed, 2 Jan 2019 15:11:05 -0800 Subject: [PATCH] Fix a couple scan-build warnings. --- src/internal.c | 2 +- src/wolfsftp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/internal.c b/src/internal.c index 0c15c11..c7f569b 100644 --- a/src/internal.c +++ b/src/internal.c @@ -4770,7 +4770,7 @@ int DoReceive(WOLFSSH* ssh) &ssh->curSz); if (ssh->curSz > MAX_PACKET_SZ - (word32)peerMacSz - LENGTH_SZ) { - ret = WS_OVERFLOW_E; + ssh->error = WS_OVERFLOW_E; return WS_FATAL_ERROR; } ssh->processReplyState = PROCESS_PACKET_FINISH; diff --git a/src/wolfsftp.c b/src/wolfsftp.c index 4dead87..85fe70e 100644 --- a/src/wolfsftp.c +++ b/src/wolfsftp.c @@ -3494,7 +3494,7 @@ static WS_SFTPNAME* wolfSSH_SFTP_DoName(WOLFSSH* ssh) WS_SFTPNAME* n = NULL; word32 maxSz; word32 count; - word32 reqId; + word32 reqId = 0; byte type = WOLFSSH_FTP_STATUS; int ret;