Skip to content

Commit

Permalink
Release v1.4.17: Release Testing Fixes
Browse files Browse the repository at this point in the history
1. C++ build required some additional typecasting.
2. C++ complained about using the `= { 0 }` initializer, switched to
   `WMEMSET()`.
  • Loading branch information
ejohnstown committed Mar 23, 2024
1 parent d288992 commit 6d51cc8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion apps/wolfssh/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion apps/wolfssh/wolfssh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion apps/wolfsshd/wolfsshd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion examples/client/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
6 changes: 4 additions & 2 deletions src/wolfsftp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 6d51cc8

Please sign in to comment.