Release v1.4.17: Release Testing Fixes

1. C++ build required some additional typecasting.
2. C++ complained about using the `= { 0 }` initializer, switched to
   `WMEMSET()`.
pull/672/head
John Safranek 2024-03-22 17:09:01 -07:00
parent d2889924cb
commit 6d51cc8278
No known key found for this signature in database
GPG Key ID: 8CE817DE0D3CCB4A
5 changed files with 11 additions and 6 deletions

View File

@ -451,7 +451,8 @@ int ClientPublicKeyCheck(const byte* pubKey, word32 pubKeySz, void* ctx)
current->ipString);
WLOG(WS_LOG_DEBUG,
"\texpecting host IP : %s", (char*)ctx);
if (XSTRCMP(ctx, current->ipString) == 0) {
if (XSTRCMP((const char*)ctx,
current->ipString) == 0) {
WLOG(WS_LOG_DEBUG, "\tmatched!");
ipMatch = 1;
}

View File

@ -794,7 +794,7 @@ static int config_parse_command_line(struct config* config,
free(config->user);
}
sz = WSTRLEN(cursor);
config->user = WMALLOC(sz + 1, NULL, 0);
config->user = (char*)WMALLOC(sz + 1, NULL, 0);
strcpy(config->user, cursor);
cursor = found + 1;
}

View File

@ -1391,8 +1391,9 @@ static int SHELL_Subsystem(WOLFSSHD_CONNECTION* conn, WOLFSSH* ssh,
#if defined(HAVE_SYS_IOCTL_H)
wolfSSH_DoModes(ssh->modes, ssh->modesSz, childFd);
{
struct winsize s = {0};
struct winsize s;
WMEMSET(&s, 0, sizeof(s));
s.ws_col = ssh->widthChar;
s.ws_row = ssh->heightRows;
s.ws_xpixel = ssh->widthPixels;

View File

@ -403,7 +403,8 @@ int ClientPublicKeyCheck(const byte* pubKey, word32 pubKeySz, void* ctx)
current->ipString);
WLOG(WS_LOG_DEBUG,
"\texpecting host IP : %s", (char*)ctx);
if (XSTRCMP(ctx, current->ipString) == 0) {
if (XSTRCMP((const char*)ctx,
current->ipString) == 0) {
WLOG(WS_LOG_DEBUG, "\tmatched!");
ipMatch = 1;
}

View File

@ -2042,7 +2042,8 @@ int wolfSSH_SFTP_RecvOpen(WOLFSSH* ssh, int reqId, byte* data, word32 maxSz)
}
{
WS_SFTP_FILEATRB fileAtr = { 0 };
WS_SFTP_FILEATRB fileAtr;
WMEMSET(&fileAtr, 0, sizeof(fileAtr));
if (SFTP_GetAttributes(ssh->fs,
dir, &fileAtr, 1, ssh->ctx->heap) == WS_SUCCESS) {
if ((fileAtr.per & FILEATRB_PER_MASK_TYPE) != FILEATRB_PER_FILE) {
@ -8767,7 +8768,8 @@ int wolfSSH_SFTP_Put(WOLFSSH* ssh, char* from, char* to, byte resume,
WLOG(WS_LOG_SFTP, "SFTP PUT STATE: OPEN LOCAL");
#ifndef USE_WINDOWS_API
{
WS_SFTP_FILEATRB fileAtr = { 0 };
WS_SFTP_FILEATRB fileAtr;
WMEMSET(&fileAtr, 0, sizeof(fileAtr));
if (SFTP_GetAttributes(ssh->fs,
from, &fileAtr, 1, ssh->ctx->heap)
== WS_SUCCESS) {