Skip to content

Commit 6d51cc8

Browse files
committed
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()`.
1 parent d288992 commit 6d51cc8

5 files changed

Lines changed: 11 additions & 6 deletions

File tree

apps/wolfssh/common.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,8 @@ int ClientPublicKeyCheck(const byte* pubKey, word32 pubKeySz, void* ctx)
451451
current->ipString);
452452
WLOG(WS_LOG_DEBUG,
453453
"\texpecting host IP : %s", (char*)ctx);
454-
if (XSTRCMP(ctx, current->ipString) == 0) {
454+
if (XSTRCMP((const char*)ctx,
455+
current->ipString) == 0) {
455456
WLOG(WS_LOG_DEBUG, "\tmatched!");
456457
ipMatch = 1;
457458
}

apps/wolfssh/wolfssh.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ static int config_parse_command_line(struct config* config,
794794
free(config->user);
795795
}
796796
sz = WSTRLEN(cursor);
797-
config->user = WMALLOC(sz + 1, NULL, 0);
797+
config->user = (char*)WMALLOC(sz + 1, NULL, 0);
798798
strcpy(config->user, cursor);
799799
cursor = found + 1;
800800
}

apps/wolfsshd/wolfsshd.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1391,8 +1391,9 @@ static int SHELL_Subsystem(WOLFSSHD_CONNECTION* conn, WOLFSSH* ssh,
13911391
#if defined(HAVE_SYS_IOCTL_H)
13921392
wolfSSH_DoModes(ssh->modes, ssh->modesSz, childFd);
13931393
{
1394-
struct winsize s = {0};
1394+
struct winsize s;
13951395

1396+
WMEMSET(&s, 0, sizeof(s));
13961397
s.ws_col = ssh->widthChar;
13971398
s.ws_row = ssh->heightRows;
13981399
s.ws_xpixel = ssh->widthPixels;

examples/client/common.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,8 @@ int ClientPublicKeyCheck(const byte* pubKey, word32 pubKeySz, void* ctx)
403403
current->ipString);
404404
WLOG(WS_LOG_DEBUG,
405405
"\texpecting host IP : %s", (char*)ctx);
406-
if (XSTRCMP(ctx, current->ipString) == 0) {
406+
if (XSTRCMP((const char*)ctx,
407+
current->ipString) == 0) {
407408
WLOG(WS_LOG_DEBUG, "\tmatched!");
408409
ipMatch = 1;
409410
}

src/wolfsftp.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2042,7 +2042,8 @@ int wolfSSH_SFTP_RecvOpen(WOLFSSH* ssh, int reqId, byte* data, word32 maxSz)
20422042
}
20432043

20442044
{
2045-
WS_SFTP_FILEATRB fileAtr = { 0 };
2045+
WS_SFTP_FILEATRB fileAtr;
2046+
WMEMSET(&fileAtr, 0, sizeof(fileAtr));
20462047
if (SFTP_GetAttributes(ssh->fs,
20472048
dir, &fileAtr, 1, ssh->ctx->heap) == WS_SUCCESS) {
20482049
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,
87678768
WLOG(WS_LOG_SFTP, "SFTP PUT STATE: OPEN LOCAL");
87688769
#ifndef USE_WINDOWS_API
87698770
{
8770-
WS_SFTP_FILEATRB fileAtr = { 0 };
8771+
WS_SFTP_FILEATRB fileAtr;
8772+
WMEMSET(&fileAtr, 0, sizeof(fileAtr));
87718773
if (SFTP_GetAttributes(ssh->fs,
87728774
from, &fileAtr, 1, ssh->ctx->heap)
87738775
== WS_SUCCESS) {

0 commit comments

Comments
 (0)