examples/client: add cert-name length bounds check in ParseRFC6187

pull/1086/head
Yosuke Shimizu 2026-06-23 11:56:27 +09:00 committed by Aidan Garske
parent fed66b9450
commit 331b2c4c97
1 changed files with 3 additions and 0 deletions

View File

@ -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 */