int wolfSSH_SFTP_SetDefaultPath(WOLFSSH* ssh, const char* path)
{
    if (ssh == NULL)
        return WS_BAD_ARGUMENT;

    if (path != NULL) {
        word32 sftpDefaultPathSz;
        sftpDefaultPathSz = (word32)XSTRLEN(path) + 1;
        ssh->sftpDefaultPath = (char*)WMALLOC(sftpDefaultPathSz,
                ssh->ctx->heap, DYNTYPE_STRING);
        if (ssh->sftpDefaultPath == NULL) {
            ssh->error = WS_MEMORY_E;
            return WS_FATAL_ERROR;
        }
        XSTRNCPY(ssh->sftpDefaultPath, path, sftpDefaultPathSz);
    }
    return WS_SUCCESS;
}
int wolfSSH_SFTP_SetDefaultPath(WOLFSSH* ssh, const char* path)
{
    if (ssh == NULL)
        return WS_BAD_ARGUMENT;

    if (path != NULL) {
        word32 sftpDefaultPathSz;
        sftpDefaultPathSz = (word32)XSTRLEN(path) + 1;
        ssh->sftpDefaultPath = (char*)WMALLOC(sftpDefaultPathSz,
                ssh->ctx->heap, DYNTYPE_STRING);
        if (ssh->sftpDefaultPath == NULL) {
            ssh->error = WS_MEMORY_E;
            return WS_FATAL_ERROR;
        }
        XSTRNCPY(ssh->sftpDefaultPath, path, sftpDefaultPathSz);
    }
    return WS_SUCCESS;
}