Skip to content

Commit 6037d0b

Browse files
error out when buffer is too small for null terminator
1 parent 8a1b62f commit 6037d0b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/internal.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15736,6 +15736,9 @@ int wolfSSH_GetPath(const char* defaultPath, byte* in, word32 inSz,
1573615736
if (curSz < *outSz) {
1573715737
out[curSz] = 0;
1573815738
}
15739+
else {
15740+
return WS_BUFFER_E;
15741+
}
1573915742
}
1574015743
*outSz = curSz;
1574115744

0 commit comments

Comments
 (0)