fix warning and update comments

pull/84/head
Jacob Barthelmeh 2018-08-06 14:40:15 -06:00
parent b86c8befd1
commit 8807fa0f2c
1 changed files with 3 additions and 2 deletions

View File

@ -1046,7 +1046,8 @@ static int GetScpTimestamp(WOLFSSH* ssh, byte* buf, word32 bufSz,
}
/* helps with checking if the base path is a directory or file */
/* helps with checking if the base path is a directory or file
* returns WS_SUCCESS on success */
static int ParseBasePathHelper(WOLFSSH* ssh, int cmdSz)
{
ScpSendCtx ctx;
@ -1067,7 +1068,7 @@ static int ParseBasePathHelper(WOLFSSH* ssh, int cmdSz)
WSTRNCAT(buf, "/..", sizeof("/.."));
clean_path(buf);
idx = WSTRLEN(buf) + 1; /* +1 for delimiter */
idx = (int)WSTRLEN(buf) + 1; /* +1 for delimiter */
if (idx > cmdSz || idx > sz) {
return WS_BUFFER_E;
}