mirror of https://github.com/wolfSSL/wolfssh.git
examples/client: add cert-name length bounds check in ParseRFC6187
parent
fed66b9450
commit
331b2c4c97
|
|
@ -331,6 +331,9 @@ static int ParseRFC6187(const byte* in, word32 inSz, byte** leafOut,
|
|||
|
||||
/* Skip the name */
|
||||
ato32(in, &l);
|
||||
if (l > inSz - sizeof(word32))
|
||||
return WS_BUFFER_E;
|
||||
|
||||
m += l + sizeof(word32);
|
||||
|
||||
/* Get the cert count */
|
||||
|
|
|
|||
Loading…
Reference in New Issue