Skip to content

Commit 6e934c1

Browse files
committed
Fix CI
1 parent 0cb7734 commit 6e934c1

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

apps/wolfssh/wolfssh.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ static int wolfSSH_AGENT_DefaultActions(WS_AgentCbAction action, void* vCtx)
599599
if (ret == WS_AGENT_SUCCESS) {
600600
WMEMSET(name, 0, sizeof(struct sockaddr_un));
601601
name->sun_family = AF_LOCAL;
602-
WSTRNCPY(name->sun_path, sockName, sizeof(name->sun_path));
602+
WSTRNCPY(name->sun_path, sockName, sizeof(name->sun_path) - 1);
603603
name->sun_path[sizeof(name->sun_path) - 1] = '\0';
604604
size = WSTRLEN(sockName) +
605605
offsetof(struct sockaddr_un, sun_path);
@@ -1046,7 +1046,7 @@ static THREAD_RETURN WOLFSSH_THREAD wolfSSH_Client(void* args)
10461046

10471047
#if !defined(SINGLE_THREADED) && !defined(WOLFSSL_NUCLEUS)
10481048
#if 0
1049-
if (keepOpen) /* set up for psuedo-terminal */
1049+
if (keepOpen) /* set up for pseudo-terminal */
10501050
ClientSetEcho(2);
10511051
#endif
10521052

examples/client/client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,7 @@ THREAD_RETURN WOLFSSH_THREAD client_test(void* args)
10201020

10211021
#if !defined(SINGLE_THREADED) && !defined(WOLFSSL_NUCLEUS) && \
10221022
defined(WOLFSSH_TERM) && !defined(NO_FILESYSTEM)
1023-
if (keepOpen) /* set up for psuedo-terminal */
1023+
if (keepOpen) /* set up for pseudo-terminal */
10241024
ClientSetEcho(2);
10251025

10261026
if (cmd != NULL || keepOpen == 1) {

examples/echoserver/echoserver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2504,7 +2504,7 @@ static void ShowUsage(void)
25042504
" add password to accept from peer\n");
25052505
#ifdef WOLFSSH_KEYBOARD_INTERACTIVE
25062506
printf(" -i <name>:<password>\n"
2507-
" add password to accept via keyboard-interactive"
2507+
" add password to accept via keyboard-interactive "
25082508
"from peer\n");
25092509
#endif
25102510
#ifdef WOLFSSH_CERTS

tests/api.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1240,7 +1240,11 @@ static void test_wolfSSH_SFTP_SendReadPacket(void)
12401240
}
12411241

12421242
if (tmp != NULL) {
1243-
out = (byte*)malloc(tmp->atrb.sz[0]);
1243+
/* Allocate buffer large enough for maximum read size */
1244+
word32 allocSz = tmp->atrb.sz[0];
1245+
if (allocSz < WOLFSSH_MAX_SFTP_RW)
1246+
allocSz = WOLFSSH_MAX_SFTP_RW;
1247+
out = (byte*)malloc(allocSz);
12441248
AssertIntEQ(wolfSSH_SFTP_Open(ssh, tmp->fName, WOLFSSH_FXF_READ,
12451249
NULL, handle, &handleSz), WS_SUCCESS);
12461250

0 commit comments

Comments
 (0)