diff --git a/src/internal.c b/src/internal.c index 2cff6ddf..d041a692 100644 --- a/src/internal.c +++ b/src/internal.c @@ -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;