Skip to content

Commit

Permalink
error out when buffer is too small for null terminator
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobBarthelmeh committed Oct 30, 2024
1 parent 8a1b62f commit 6037d0b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -15736,6 +15736,9 @@ int wolfSSH_GetPath(const char* defaultPath, byte* in, word32 inSz,
if (curSz < *outSz) {
out[curSz] = 0;
}
else {
return WS_BUFFER_E;
}
}
*outSz = curSz;

Expand Down

0 comments on commit 6037d0b

Please sign in to comment.