sanity check on arguments with debug

pull/79/head
Jacob Barthelmeh 2018-06-14 17:17:07 -06:00
parent cdc153bc42
commit c7b2dfbf1d
1 changed files with 5 additions and 3 deletions

View File

@ -2701,10 +2701,12 @@ static int DoDebug(WOLFSSH* ssh, byte* buf, word32 len, word32* idx)
char* msg = NULL;
char* lang = NULL;
word32 strSz;
word32 begin = *idx;
word32 begin;
(void)ssh;
(void)len;
if (ssh == NULL || buf == NULL || idx == NULL || len < LENGTH_SZ + 1) {
return WS_BAD_ARGUMENT;
}
begin = *idx;
alwaysDisplay = buf[begin++];